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

Check partial keybindings to match current context #6752

Merged
merged 1 commit into from
Dec 16, 2019
Merged

Conversation

vinokurig
Copy link
Contributor

@vinokurig vinokurig commented Dec 13, 2019

What it does

Check partial keybindings to match current context. VsCode uses the same approach: https://github.com/microsoft/vscode/blob/1bf341e6d2b0963e6260853e570d2655f987ffcb/src/vs/platform/keybinding/common/keybindingResolver.ts#L279-L292
They look for a suitable command by checking the context before viewing partial keybinding notification in the status bar

How to test

  1. Apply VsCode Vim extension
  2. Disable the Vim plugin by executing F1 => Vim: Toggle Vim Mode
  3. Press g key.
    See that the status bar didn't change.
    Theia at current master state shows a notification in the the status bar, that the first part of the keybinding was pressed.

Review checklist

Reminder for reviewers

Signed-off-by: Igor Vinokur <ivinokur@redhat.com>
Copy link
Member

@paul-marechal paul-marechal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, the status bar seems to display the correct information.

Copy link
Member

@akosyakov akosyakov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have not tested, but expecting only active chords make sense to me.

@vinokurig vinokurig merged commit ef4cb2c into master Dec 16, 2019
@vinokurig vinokurig deleted the vim-fixup branch December 16, 2019 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
keybindings issues related to keybindings vscode issues related to VSCode compatibility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants