LSP: take account of resolveTarget when checking for links

Return a link to the word under cursor when the target should not
get resolved. This results in a highlight of the text the mouse cursor
is positioned on when pressing ctrl to follow a link.

Change-Id: Iaf1ba289644ed3e3fc062b418dd2fa3bfa8da6ad
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
David Schulz
2019-01-21 14:28:13 +01:00
parent 11eea3aae0
commit 73161356d5
2 changed files with 19 additions and 7 deletions

View File

@@ -97,7 +97,7 @@ private:
void documentContentsSaved(Core::IDocument *document);
void documentWillSave(Core::IDocument *document);
void findLinkAt(TextEditor::TextDocument *document, const QTextCursor &cursor,
Utils::ProcessLinkCallback callback);
Utils::ProcessLinkCallback callback, const bool resolveTarget);
void findUsages(TextEditor::TextDocument *document, const QTextCursor &cursor);
void projectAdded(ProjectExplorer::Project *project);