Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Utilities
Kate
Commits
0f6aef94
Commit
0f6aef94
authored
Feb 23, 2021
by
Waqar Ahmed
Browse files
Make sure we don't trigger lsp-hover while there is a selection in progress
parent
9814f245
Changes
1
Hide whitespace changes
Inline
Side-by-side
addons/lspclient/lspclienthover.cpp
View file @
0f6aef94
...
...
@@ -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
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment