Commit 494f0764 authored by Thorbjørn Lindeijer's avatar Thorbjørn Lindeijer

Fix the navigation links on Ctrl-hover

Link position had the wrong offset. Also took out a redundant check on
token kind.
parent 733fb8fb
......@@ -625,11 +625,6 @@ CPPEditor::Link CPPEditor::findLinkAt(const QTextCursor &cursor,
QTextBlock block;
const SimpleToken tk = tokenUnderCursor(tc, &block);
if (tk.isLiteral() || tk.isComment()) {
// Drop out if we're at a number, string or comment
return link;
}
if (tk.isNot(T_IDENTIFIER))
return link;
......@@ -668,7 +663,7 @@ CPPEditor::Link CPPEditor::findLinkAt(const QTextCursor &cursor,
def = findDefinition(symbol);
link = linkToSymbol(def ? def : symbol);
link.pos = nameStart;
link.pos = block.position() + nameStart;
link.length = nameLength;
return link;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment