ZIm/crates/vim/test_data/test_delete_paragraph.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

14 lines
428 B
JSON

{"Put":{"state":"helˇlo world.\n\nhello world.\n"}}
{"Key":"y"}
{"Key":"}"}
{"Key":"d"}
{"Key":"}"}
{"Get":{"state":"heˇl\n\nhello world.\n","mode":"Normal"}}
{"ReadRegister":{"name":"\"","value":"lo world."}}
{"Get":{"state":"heˇl\n\nhello world.\n","mode":"Normal"}}
{"Put":{"state":"ˇhello world.\n\nhello world.\n"}}
{"Key":"y"}
{"Key":"}"}
{"Key":"d"}
{"Key":"}"}
{"Get":{"state":"ˇ\nhello world.\n","mode":"Normal"}}