Skip to content
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

Handle PageUp and PageDown in the completion and popups #13054

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MarSik
Copy link

@MarSik MarSik commented Mar 8, 2025

This fixes three issues:

  1. 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.

  2. 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.

  3. 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.

@MarSik MarSik force-pushed the keys-pgup-pgdown-compl branch from d9fef9d to 06e9b5e Compare March 8, 2025 09:22
This fixes three issues:

1) 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.

2) 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.

3) 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.

Signed-off-by: Martin Sivak <[email protected]>
@MarSik MarSik force-pushed the keys-pgup-pgdown-compl branch from 06e9b5e to 536033f Compare March 9, 2025 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant