zed/crates/vim/test_data/test_cgn_nomatch.json
joaquin30 f9bf60f017
vim: Fix cgn backwards movement when there is no matches (#10237)
Release Notes:

- Fixed `cgn` backwards movement problem in #9982

There are two issues:

- When there are no more matches, the next repetition still moves the
cursor to the left. After that, the recording is cleared. For this I
simply move the cursor to the right, but it doesn't work when the cursor
is at the end of the line.
- If `cgn` is used when there are no matches, it cleans the previous
recorded actions. Maybe there should be a way to revert the recording.
This also happens when using `c` and `esc`

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2024-04-08 14:51:36 -06:00

29 lines
645 B
JSON

{"Put":{"state":"aaˇ aa aa aa aa"}}
{"Key":"/"}
{"Key":"b"}
{"Key":"b"}
{"Key":"enter"}
{"Get":{"state":"aaˇ aa aa aa aa","mode":"Normal"}}
{"Key":"c"}
{"Key":"g"}
{"Key":"n"}
{"Key":"x"}
{"Key":"escape"}
{"Get":{"state":"aaˇaa aa aa aa","mode":"Normal"}}
{"Key":"."}
{"Get":{"state":"aaˇa aa aa aa","mode":"Normal"}}
{"Put":{"state":"aaˇ bb aa aa aa"}}
{"Key":"/"}
{"Key":"b"}
{"Key":"b"}
{"Key":"enter"}
{"Get":{"state":"aa ˇbb aa aa aa","mode":"Normal"}}
{"Key":"c"}
{"Key":"g"}
{"Key":"n"}
{"Key":"x"}
{"Key":"escape"}
{"Get":{"state":"aa ˇx aa aa aa","mode":"Normal"}}
{"Key":"."}
{"Get":{"state":"aa ˇx aa aa aa","mode":"Normal"}}