forked from qt-creator/qt-creator
Use positionInBlock in BackwardsScanner
Change-Id: I7af777f1ff4d1b93e23462ceaf8b5989b8358d3b Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -46,7 +46,7 @@ BackwardsScanner::BackwardsScanner(const QTextCursor &cursor,
|
||||
{
|
||||
_tokenize.setLanguageFeatures(languageFeatures);
|
||||
_tokenize.setSkipComments(skipComments);
|
||||
_text = _block.text().left(cursor.position() - cursor.block().position());
|
||||
_text = _block.text().left(cursor.positionInBlock());
|
||||
|
||||
if (! suffix.isEmpty())
|
||||
_text += suffix;
|
||||
|
Reference in New Issue
Block a user