ZIm/crates/vim/test_data/test_paste_visual.json
Conrad Irwin fc269dfaf9
vim: Handle exclusive-linewise edgecase correctly (#27786)
Before this change we didn't explicitly handle vim's exclusive-linewise
edgecase
(https://neovim.io/doc/user/motion.html#exclusive).

Instead we had hard-coded workarounds in a few places to make our tests
pass.
The most pernicious of these workarounds was that we represented a
visual line
selection as including the trailing newline (or leading newline for
files that
end with no newline), which other code had to undo to get back to what
the user
indended.

Closes #21440
Updates #6900

Release Notes:

- vim: Fixed `d]}` to not delete the closing brace
- vim: Fixed `d}` from the start of the line to not delete the paragraph
separator
- vim: Fixed `d}` from the middle of the line to not delete the final
newline
2025-03-31 10:36:20 -06:00

43 lines
1.4 KiB
JSON

{"Put":{"state":"The quick brown\nfox jˇumps over\nthe lazy dog"}}
{"Key":"v"}
{"Key":"i"}
{"Key":"w"}
{"Key":"y"}
{"Get":{"state":"The quick brown\nfox ˇjumps over\nthe lazy dog","mode":"Normal"}}
{"Key":"w"}
{"Key":"v"}
{"Key":"i"}
{"Key":"w"}
{"Key":"p"}
{"Get":{"state":"The quick brown\nfox jumps jumpˇs\nthe lazy dog","mode":"Normal"}}
{"ReadRegister":{"name":"\"","value":"over"}}
{"Key":"up"}
{"Key":"shift-v"}
{"Key":"shift-p"}
{"Get":{"state":"ˇover\nfox jumps jumps\nthe lazy dog","mode":"Normal"}}
{"ReadRegister":{"name":"\"","value":"over"}}
{"Key":"ctrl-v"}
{"Key":"down"}
{"Key":"down"}
{"Key":"p"}
{"Get":{"state":"oveˇrver\noverox jumps jumps\noverhe lazy dog","mode":"Normal"}}
{"Put":{"state":"The quick brown\nfox juˇmps over\nthe lazy dog"}}
{"Key":"shift-v"}
{"Key":"d"}
{"Get":{"state":"The quick brown\nthe laˇzy dog","mode":"Normal"}}
{"Key":"v"}
{"Key":"i"}
{"Key":"w"}
{"Key":"p"}
{"Get":{"state":"The quick brown\nthe \nˇfox jumps over\n dog","mode":"Normal"}}
{"ReadRegister":{"name":"\"","value":"lazy"}}
{"Put":{"state":"The quick brown\nfox juˇmps over\nthe lazy dog"}}
{"Key":"shift-v"}
{"Key":"d"}
{"Get":{"state":"The quick brown\nthe laˇzy dog","mode":"Normal"}}
{"ReadRegister":{"name":"\"","value":"fox jumps over\n"}}
{"Key":"k"}
{"Key":"shift-v"}
{"Key":"p"}
{"Get":{"state":"ˇfox jumps over\nthe lazy dog","mode":"Normal"}}
{"ReadRegister":{"name":"\"","value":"The quick brown\n"}}