-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Refactor completion doc popup and fix positioning #5842
Refactor completion doc popup and fix positioning #5842
Conversation
Earlier the doc popup would draw over the compeltion popup itself and sometimes over the cursor too.
Right now we render the documentation popup on the right of the completion popup when there is enough space. Maybe instead of showing the completion popup on top when there isn't enough space, we should show it in the left instead. |
I actually wanted to implement it but forgot about it in the middle of fixing the bug, thanks for the reminder :) Should be a pretty small change. |
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.
Great work!
Refactor the logic for rendering completion documentation popup. The changes include using an early return, renaming some variables (overshadowing
area
,height
, etc tends to be confusing) and making some area calculations more readable. Most importantly this PR also contains a fix for preventing the rendering of the completion doc popup over the completion popup itself and to not draw over the cursor.Each commit does a single refactor and the last commit contains the bug fix (The full diff across all the commits might be hard to read since the first commit introduces an early return that dedents a whole block; stepping through the commits should be easier for reviewing).