zed icon indicating copy to clipboard operation
zed copied to clipboard

Fix renaming sometimes not working in vim mode

Open Congyuwang opened this issue 1 year ago • 4 comments

Disable vim key contexts during renaming, to fix renaming being interfered with vim commands.

Release Notes:

  • Fixed renaming sometimes not working in vim normal or visual mode #14292 #11882.

Congyuwang avatar Jul 12 '24 11:07 Congyuwang

this might not fix this problem. when you active rename, then waiting (might some milliseconds), then typing any key which has binding action in vim mode, will see unexpected behaviour.

CharlesChen0823 avatar Jul 12 '24 11:07 CharlesChen0823

@CharlesChen0823 Yes, I see that problem. For example during renaming, pressing i got that i omitted from the new variable name.

Congyuwang avatar Jul 12 '24 11:07 Congyuwang

@Congyuwang yes, you are right.

CharlesChen0823 avatar Jul 12 '24 11:07 CharlesChen0823

Upon renaming, disable vim key contexts, this should fix the problem.

Congyuwang avatar Jul 13 '24 01:07 Congyuwang

@Congyuwang Thank you for this! While reviewing I noticed we had the same bug in inline assist, so I made the solution a little more general to handle both.

Will merge when green.

ConradIrwin avatar Jul 16 '24 20:07 ConradIrwin

#14292 is still present.

Congyuwang avatar Jul 17 '24 02:07 Congyuwang