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

Keybindings reset on invalid command #3295

Closed
rpeshkov opened this issue Dec 27, 2018 · 1 comment · Fixed by #3314 or #3320
Closed

Keybindings reset on invalid command #3295

rpeshkov opened this issue Dec 27, 2018 · 1 comment · Fixed by #3314 or #3320
Labels

Comments

@rpeshkov
Copy link

Describe the bug
If there was a typo in keybinding command, all keybindings get erased. Only togglevim command helps to restore it back.

To Reproduce
Steps to reproduce the behavior:

  1. Open settings.json
  2. Add keybindings for normal mode:
    "vim.normalModeKeyBindingsNonRecursive": [
        {
            "before": ["<C-d>"],
            "commands": [ "cursorPageDown" ]
        },
        {
            "before": ["<C-u>"],
            "commands": [ "abracadabra_not_existing_command" ]
        }
    ]
  1. Press Ctrl+d to see that it works
  2. Press Ctrl+u - nothing happens, because command doesn't exist.
  3. Press Ctrl+d once again - it doesn't work now.

Expected behavior
In provided example - after pushing Ctrl+u that triggers not existing command, Ctrl+d should continue to work.

Environment (please complete the following information):

  • Extension (VsCodeVim) version: 0.17.0
  • VSCode version: 1.30.1
  • OS: MacOS 10.14.2 (18C54)
@rpeshkov
Copy link
Author

Additional note. This happens only for normalModeKeyBindingsNonRecursive bindings. normalModeKeyBindings don't have this issue.

@jpoon jpoon closed this as completed in d1261f2 Dec 28, 2018
jpoon added a commit that referenced this issue Dec 28, 2018
fix: ignore remappings with non-existent commands. fixes #3295
@jpoon jpoon added the kind/bug label Dec 28, 2018
jpoon added a commit that referenced this issue Jan 2, 2019
jpoon added a commit that referenced this issue Jan 2, 2019
jpoon added a commit that referenced this issue Jan 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants