vim: Fix deletion with sentence-motion (#22289)
Fixes #22151. Turns out Vim also has some weird behavior with sentence deletion in case it's on the first character of a line. Release Notes: - vim: Fixed deleting sentence-wise (i.e. `d(` and `d)`), which would previously delete the whole line instead of just a sentence.
This commit is contained in:
parent
7c03e11cfc
commit
b25d8ecb75
3 changed files with 98 additions and 14 deletions
22
crates/vim/test_data/test_delete_sentence.json
Normal file
22
crates/vim/test_data/test_delete_sentence.json
Normal file
|
@ -0,0 +1,22 @@
|
|||
{"Put":{"state":"Fiˇrst. Second. Third.\nFourth.\n"}}
|
||||
{"Key":"d"}
|
||||
{"Key":")"}
|
||||
{"Get":{"state":"FiˇSecond. Third.\nFourth.\n","mode":"Normal"}}
|
||||
{"Put":{"state":"First. Secˇond. Third.\nFourth.\n"}}
|
||||
{"Key":"d"}
|
||||
{"Key":")"}
|
||||
{"Get":{"state":"First. SecˇThird.\nFourth.\n","mode":"Normal"}}
|
||||
{"Put":{"state":"First. Second. Thirˇd.\nFourth.\n"}}
|
||||
{"Key":"d"}
|
||||
{"Key":")"}
|
||||
{"Key":"d"}
|
||||
{"Key":")"}
|
||||
{"Get":{"state":"First. Second. Thˇi\n","mode":"Normal"}}
|
||||
{"Put":{"state":"ˇFirst.\nFourth.\n"}}
|
||||
{"Key":"d"}
|
||||
{"Key":")"}
|
||||
{"Get":{"state":"ˇFourth.\n","mode":"Normal"}}
|
||||
{"Put":{"state":"First.\nˇSecond.\nFourth.\n"}}
|
||||
{"Key":"d"}
|
||||
{"Key":"("}
|
||||
{"Get":{"state":"ˇSecond.\nFourth.\n","mode":"Normal"}}
|
Loading…
Add table
Add a link
Reference in a new issue