zed icon indicating copy to clipboard operation
zed copied to clipboard

Input delay on non-chorded keymaps

Open kbknapp opened this issue 6 months ago • 0 comments

Check for existing issues

  • [X] Completed

Describe the bug / provide steps to reproduce it

Add a keymap that does not use a chord to any context except vim_mode == normal such as:

  {
    "context": "Pane",
    "bindings": {
      "space b K": "pane::CloseInactiveItems"
    }
  }

Now in an editor, enter insert mode and type anything that includes a space and you will see a noticeable (several hundred ms?) delay.

This makes sense as it's listening for the follow on key presses, however it was super un-intuitive and took me a while to figure out what was going on.

The fix was to move all "leader" keymaps into vim_mode == normal.

It feels like there should be a warning or something for this as it seems entirely reasonable that someone would try to copy over their (Neo)vim key bindings including "leader" mappings (for me leader was space but this would presumably apply to any standard leader key).

Environment

Zed: v0.149.3 (Zed) OS: macOS 14.5.0 Memory: 16 GiB Architecture: aarch64

If applicable, add mockups / screenshots to help explain present your vision of the feature

No response

If applicable, attach your Zed.log file to this issue.

N/A

kbknapp avatar Aug 21 '24 23:08 kbknapp