Handle PageUp and PageDown in the completion and popups #13054
+59
−24
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes three issues:
PageUp and PageDown during completion selection moved the
viewport without cancelling the completion itself. It also
left the last completion selected in the text.
The change adds PageUp and PageDown handling to the existing
movements (with the Ctrl-u and Ctrl-d aliases) to make
the behavior of the editor and the menus consistent with
each other.
Completion key actions were processed after the popup key
actions. This prevented the PageUp / PageDown logic from
being executed, because the popup swallowed them.
The change reverses the logic, because the most active
element should be handling the keys. Both code lens
(space-k) and code completion now handle the page
movements properly and consistently.
Popup Ctrl-u and Ctrl-d movements did not have the
PageUp and PageDown aliases defined. This was confusing
for new users as the editor itself recognizes those.