-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[READY] Handle scrolling when hover popup is open #4209
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #4209 +/- ##
==========================================
- Coverage 89.59% 89.58% -0.02%
==========================================
Files 34 34
Lines 4440 4445 +5
==========================================
+ Hits 3978 3982 +4
- Misses 462 463 +1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests... How do we even test "do X if mouse pointer at (x, y) position"? The behaviour differs when mouse pointer is inside or outside the popup area.
there's a special vim function test_setmouse()
iirc you can also do feedkeys("\<MouseMove>")
or something similar
Reviewable status: 0 of 2 LGTMs obtained
38c1148
to
5f5fc9c
Compare
The test was working fine on my machine, but was inexplicably failing on CI. That's why I scrapped the test. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status: 1 of 2 LGTMs obtained (waiting on @bstaletic)
5f5fc9c
to
cd48033
Compare
There are two kinds of scrolling that need to be handled: 1. Scrolling the buffer in a window shifts the buffer, but popups stay in place. Instead, we close the popup whenever we receive a WinScrolled event. 2. Scrolling the popup contents themselves resets the `updatetime` timer and can trigger a second CursorHold event, which leads to YCM resetting the hover popup. Instead, only re-display the hover popup if it is not already visible.
Thanks for sending a PR! |
PR Prelude
Thank you for working on YCM! :)
Please complete these steps and check these boxes (by putting an
x
insidethe brackets) before filing your PR:
rationale for why I haven't.
actually perform all of these steps.
Why this change is necessary and useful
There are two kinds of scrolling that need to be handled:
updatetime
timer and can trigger a secondCursorHold
event, which leads to YCM resetting the hover popup. Instead, only re-display the hover popup if it is not already visible.Open questions:
WinScrolled
?This change is