Fix find_{,preceding}boundary to work on buffer text
Before this change the bounday could mistakenly have happened on a soft line wrap. Also fixes interaction with inlays better.
This commit is contained in:
parent
e7ba5a1edb
commit
d3650594c3
10 changed files with 174 additions and 146 deletions
32
crates/vim/test_data/test_end_of_word.json
Normal file
32
crates/vim/test_data/test_end_of_word.json
Normal file
|
@ -0,0 +1,32 @@
|
|||
{"Put":{"state":"Thˇe quick-brown\n\n\nfox_jumps over\nthe"}}
|
||||
{"Key":"e"}
|
||||
{"Get":{"state":"The quicˇk-brown\n\n\nfox_jumps over\nthe","mode":"Normal"}}
|
||||
{"Key":"e"}
|
||||
{"Get":{"state":"The quickˇ-brown\n\n\nfox_jumps over\nthe","mode":"Normal"}}
|
||||
{"Key":"e"}
|
||||
{"Get":{"state":"The quick-browˇn\n\n\nfox_jumps over\nthe","mode":"Normal"}}
|
||||
{"Key":"e"}
|
||||
{"Get":{"state":"The quick-brown\n\n\nfox_jumpˇs over\nthe","mode":"Normal"}}
|
||||
{"Key":"e"}
|
||||
{"Get":{"state":"The quick-brown\n\n\nfox_jumps oveˇr\nthe","mode":"Normal"}}
|
||||
{"Key":"e"}
|
||||
{"Get":{"state":"The quick-brown\n\n\nfox_jumps over\nthˇe","mode":"Normal"}}
|
||||
{"Key":"e"}
|
||||
{"Get":{"state":"The quick-brown\n\n\nfox_jumps over\nthˇe","mode":"Normal"}}
|
||||
{"Put":{"state":"Thˇe quick-brown\n\n\nfox_jumps over\nthe"}}
|
||||
{"Key":"shift-e"}
|
||||
{"Get":{"state":"The quick-browˇn\n\n\nfox_jumps over\nthe","mode":"Normal"}}
|
||||
{"Put":{"state":"The quicˇk-brown\n\n\nfox_jumps over\nthe"}}
|
||||
{"Key":"shift-e"}
|
||||
{"Get":{"state":"The quick-browˇn\n\n\nfox_jumps over\nthe","mode":"Normal"}}
|
||||
{"Put":{"state":"The quickˇ-brown\n\n\nfox_jumps over\nthe"}}
|
||||
{"Key":"shift-e"}
|
||||
{"Get":{"state":"The quick-browˇn\n\n\nfox_jumps over\nthe","mode":"Normal"}}
|
||||
{"Key":"shift-e"}
|
||||
{"Get":{"state":"The quick-brown\n\n\nfox_jumpˇs over\nthe","mode":"Normal"}}
|
||||
{"Key":"shift-e"}
|
||||
{"Get":{"state":"The quick-brown\n\n\nfox_jumps oveˇr\nthe","mode":"Normal"}}
|
||||
{"Key":"shift-e"}
|
||||
{"Get":{"state":"The quick-brown\n\n\nfox_jumps over\nthˇe","mode":"Normal"}}
|
||||
{"Key":"shift-e"}
|
||||
{"Get":{"state":"The quick-brown\n\n\nfox_jumps over\nthˇe","mode":"Normal"}}
|
|
@ -1,9 +1,9 @@
|
|||
{"Put":{"state":"The quick ˇbrown\nfox"}}
|
||||
{"Put":{"state":"The quick brown\nˇ\nfox"}}
|
||||
{"Key":"v"}
|
||||
{"Get":{"state":"The quick «bˇ»rown\nfox","mode":"Visual"}}
|
||||
{"Get":{"state":"The quick brown\n«\nˇ»fox","mode":"Visual"}}
|
||||
{"Key":"i"}
|
||||
{"Key":"w"}
|
||||
{"Get":{"state":"The quick «brownˇ»\nfox","mode":"Visual"}}
|
||||
{"Get":{"state":"The quick brown\n«\nˇ»fox","mode":"Visual"}}
|
||||
{"Put":{"state":"The quick ˇbrown \nfox jumps over\nthe lazy dog \n\n\n\nThe-quick brown \n \n \n fox-jumps over\nthe lazy dog \n\n"}}
|
||||
{"Key":"v"}
|
||||
{"Key":"i"}
|
||||
|
|
|
@ -48,3 +48,8 @@
|
|||
{"Key":"o"}
|
||||
{"Key":"escape"}
|
||||
{"Get":{"state":"twelve char\nˇo\ntwelve char twelve char\ntwelve char\n","mode":"Normal"}}
|
||||
{"Put":{"state":"fourteen chaˇr\nfourteen char\n"}}
|
||||
{"Key":"d"}
|
||||
{"Key":"i"}
|
||||
{"Key":"w"}
|
||||
{"Get":{"state":"fourteenˇ \nfourteen char\n","mode":"Normal"}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue