diff options
author | Thorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com> | 2009-04-21 15:32:50 +0200 |
---|---|---|
committer | Thorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com> | 2009-04-21 15:58:48 +0200 |
commit | b6d7fecf801449894d2e82719d94da5fc364963c (patch) | |
tree | c7c413f1a7f3400fb987f1e91d1685f4ace35140 | |
parent | 57bf55dec96e0176831a70b613d581c179cd172a (diff) |
Fixed navigation with F2 when at the start of a word
Reviewed-by: con
-rw-r--r-- | src/plugins/cppeditor/cppeditor.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/plugins/cppeditor/cppeditor.cpp b/src/plugins/cppeditor/cppeditor.cpp index 8ca868ad75..3544cf3f2d 100644 --- a/src/plugins/cppeditor/cppeditor.cpp +++ b/src/plugins/cppeditor/cppeditor.cpp @@ -604,6 +604,13 @@ CPPEditor::Link CPPEditor::findLinkAt(const QTextCursor &cursor, QTextCursor tc = cursor; + // Make sure we're not at the start of a word + { + const QChar c = characterAt(tc.position()); + if (c.isLetter() || c == QLatin1Char('_')) + tc.movePosition(QTextCursor::Right); + } + static TokenUnderCursor tokenUnderCursor; QTextBlock block; |