diff options
Diffstat (limited to 'src/plugins/cpptools/cppcanonicalsymbol.cpp')
-rw-r--r-- | src/plugins/cpptools/cppcanonicalsymbol.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/plugins/cpptools/cppcanonicalsymbol.cpp b/src/plugins/cpptools/cppcanonicalsymbol.cpp index 3f1869de63..fa5d074921 100644 --- a/src/plugins/cpptools/cppcanonicalsymbol.cpp +++ b/src/plugins/cpptools/cppcanonicalsymbol.cpp @@ -60,7 +60,6 @@ Scope *CanonicalSymbol::getScopeAndExpression(const QTextCursor &cursor, QString QTextCursor tc = cursor; int line, column; Utils::Text::convertPosition(cursor.document(), tc.position(), &line, &column); - ++column; // 1-based line and 1-based column int pos = tc.position(); QTextDocument *textDocument = cursor.document(); @@ -74,7 +73,7 @@ Scope *CanonicalSymbol::getScopeAndExpression(const QTextCursor &cursor, QString ExpressionUnderCursor expressionUnderCursor(m_document->languageFeatures()); *code = expressionUnderCursor(tc); - return m_document->scopeAt(line, column); + return m_document->scopeAt(line, column - 1); } Symbol *CanonicalSymbol::operator()(const QTextCursor &cursor) |