zed icon indicating copy to clipboard operation
zed copied to clipboard

Fix bug with keymaps flickering in mouse menu

Open babyccino opened this issue 1 year ago • 1 comments

Fixes a bug where Vim bindings would flash in the mouse context menu and then be replaced by the default keybindings. Also fixes those bindings not being usable while the mouse context menu was open.

Release Notes:

  • Fixed bug where Vim bindings were not available when mouse context menu was open

babyccino avatar May 14 '24 11:05 babyccino

@babyccino thanks for figuring this out!

Unfortunately this doesn't account for the case when the inline assistant is open, as we still need to disable vim in that mode...

I've pushed up a more precise check which I think covers the case we need, and will merge when green.

ConradIrwin avatar May 14 '24 22:05 ConradIrwin

@babyccino thanks for figuring this out!

Unfortunately this doesn't account for the case when the inline assistant is open, as we still need to disable vim in that mode...

I've pushed up a more precise check which I think covers the case we need, and will merge when green.

Ah good call, I never use the assistant so I didn't notice that 😂. I'm wondering if it wouldn't be simpler to just have a Vim context which is always on when vim mode is on

babyccino avatar May 14 '24 23:05 babyccino

It’s a tricky interaction because we don’t want vim enabled in the rename editor - but it’s just an editor - and so the way keybinding works we can’t easily distinguish by context

ConradIrwin avatar May 14 '24 23:05 ConradIrwin

It’s a tricky interaction because we don’t want vim enabled in the rename editor - but it’s just an editor - and so the way keybinding works we can’t easily distinguish by context

I'm thinking if you just had a Context just like "Vim" or something which was separate from your vim_mode then you could have bindings in the project panel which are only active when vim mode is active because (I think?) at the moment there's no way to know if vim mode is on when you're outside the editor. ATM Zed just loads/unloads those vim default keybindings when it's turned on/off

babyccino avatar May 14 '24 23:05 babyccino