Files
zed/crates/vim/test_data/test_repeat_clear_repeat.json
AidanV 4a36f67f94 vim: Fix bug where d . . freezes the editor (#42145)
This bug seems to be caused by pushing an operator (i.e. `d`) followed
by a repeat (i.e. `.`) so the recording includes the push operator and
the repeat. When this is repeated (i.e. `.`) it causes an infinite loop.

This change fixes this bug by pushing a ClearOperator action if there is
an ongoing recording when repeat is called.

Release Notes:

- Fixed bug where pressing `d . .` in Vim mode would freeze the editor.

---------

Co-authored-by: dino <dinojoaocosta@gmail.com>
2025-11-24 16:55:19 +00:00

9 lines
246 B
JSON

{"Put":{"state":"ˇthe quick brown\nfox jumps over\nthe lazy dog"}}
{"Key":"d"}
{"Key":"d"}
{"Get":{"state":"ˇfox jumps over\nthe lazy dog","mode":"Normal"}}
{"Key":"d"}
{"Key":"."}
{"Key":"."}
{"Get":{"state":"ˇthe lazy dog","mode":"Normal"}}