diff options
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/cppeditor/cppeditor.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/cppeditor/cppeditor.cpp b/src/plugins/cppeditor/cppeditor.cpp index a6fbcfc0304..c616a7b8a93 100644 --- a/src/plugins/cppeditor/cppeditor.cpp +++ b/src/plugins/cppeditor/cppeditor.cpp @@ -632,10 +632,10 @@ CPPEditor::Link CPPEditor::findLinkAt(const QTextCursor &cursor, const int nameStart = tk.position(); const int nameLength = tk.length(); - const int endOfName = nameStart + nameLength; + const int endOfName = block.position() + nameStart + nameLength; const QString name = block.text().mid(nameStart, nameLength); - tc.setPosition(block.position() + endOfName); + tc.setPosition(endOfName); // Evaluate the type of the expression under the cursor ExpressionUnderCursor expressionUnderCursor; |