vim: Fix count handling to allow pre/post counts
Fixes 2yy, d3d, etc. For zed-industries/community#970 For zed-industries/community#1496
This commit is contained in:
parent
e8a6ecd6ac
commit
cee549e1ef
13 changed files with 175 additions and 54 deletions
16
crates/vim/test_data/test_delete_with_counts.json
Normal file
16
crates/vim/test_data/test_delete_with_counts.json
Normal file
|
@ -0,0 +1,16 @@
|
|||
{"Put":{"state":"The ˇquick brown\nfox jumps over\nthe lazy dog"}}
|
||||
{"Key":"d"}
|
||||
{"Key":"2"}
|
||||
{"Key":"d"}
|
||||
{"Get":{"state":"the ˇlazy dog","mode":"Normal"}}
|
||||
{"Put":{"state":"The ˇquick brown\nfox jumps over\nthe lazy dog"}}
|
||||
{"Key":"2"}
|
||||
{"Key":"d"}
|
||||
{"Key":"d"}
|
||||
{"Get":{"state":"the ˇlazy dog","mode":"Normal"}}
|
||||
{"Put":{"state":"The ˇquick brown\nfox jumps over\nthe moon,\na star, and\nthe lazy dog"}}
|
||||
{"Key":"2"}
|
||||
{"Key":"d"}
|
||||
{"Key":"2"}
|
||||
{"Key":"d"}
|
||||
{"Get":{"state":"the ˇlazy dog","mode":"Normal"}}
|
13
crates/vim/test_data/test_repeat_motion_counts.json
Normal file
13
crates/vim/test_data/test_repeat_motion_counts.json
Normal file
|
@ -0,0 +1,13 @@
|
|||
{"Put":{"state":"ˇthe quick brown\nfox jumps over\nthe lazy dog"}}
|
||||
{"Key":"3"}
|
||||
{"Key":"d"}
|
||||
{"Key":"3"}
|
||||
{"Key":"l"}
|
||||
{"Get":{"state":"ˇ brown\nfox jumps over\nthe lazy dog","mode":"Normal"}}
|
||||
{"Key":"j"}
|
||||
{"Key":"."}
|
||||
{"Get":{"state":" brown\nˇ over\nthe lazy dog","mode":"Normal"}}
|
||||
{"Key":"j"}
|
||||
{"Key":"2"}
|
||||
{"Key":"."}
|
||||
{"Get":{"state":" brown\n over\nˇe lazy dog","mode":"Normal"}}
|
Loading…
Add table
Add a link
Reference in a new issue