forked from qt-creator/qt-creator
Jump to the declaration if the last visible symbol is the current function definition.
This commit is contained in:
@@ -1348,9 +1348,13 @@ CPPEditor::Link CPPEditor::findLinkAt(const QTextCursor &cursor,
|
||||
if (Symbol *symbol = result.declaration()) {
|
||||
Symbol *def = 0;
|
||||
|
||||
if (resolveTarget)
|
||||
if (resolveTarget) {
|
||||
def = findDefinition(symbol, snapshot);
|
||||
|
||||
if (def == doc->findSymbolAt(line, column))
|
||||
def = 0; // jump to declaration then.
|
||||
}
|
||||
|
||||
link = linkToSymbol(def ? def : symbol);
|
||||
link.begin = beginOfToken;
|
||||
link.end = endOfToken;
|
||||
|
||||
Reference in New Issue
Block a user