Commit 0f6aef94 authored by Waqar Ahmed's avatar Waqar Ahmed
Browse files

Make sure we don't trigger lsp-hover while there is a selection in progress

parent 9814f245
......@@ -74,12 +74,15 @@ public:
finalTooltip.append(element.value);
}
LspTooltip::show(finalTooltip, v->mapToGlobal(v->cursorToCoordinate(position)), v);
// make sure there is no selection, otherwise we interrupt
if (!v->selection()) {
LspTooltip::show(finalTooltip, v->mapToGlobal(v->cursorToCoordinate(position)), v);
}
};
if (view && view->document()) {
auto doc = view->document();
if (doc->wordAt(position).isEmpty()) {
if (doc->wordAt(position).isEmpty() || view->selection()) {
return {};
}
m_handle.cancel() = m_server->documentHover(view->document()->url(), position, this, h);
......
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