vim: Handle paste in visual line mode when cursor is at newline (#30791)

This Pull Request fixes the current paste behavior in vim mode, when in
visual mode, and the cursor is at a newline character. Currently this
joins the pasted contents with the line right below it, but in vim this
does not happen, so these changes make it so that Zed's vim mode behaves
the same as vim for this specific case.

Closes #29270 

Release Notes:

- Fixed pasting in vim's visual line mode when cursor is on a newline
character
This commit is contained in:
Dino
2025-06-02 09:50:13 -06:00
committed by GitHub
parent a6544c70c5
commit ebed567adb
2 changed files with 33 additions and 1 deletions
@@ -41,3 +41,11 @@
{"Key":"p"}
{"Get":{"state":"ˇfox jumps over\nthe lazy dog","mode":"Normal"}}
{"ReadRegister":{"name":"\"","value":"The quick brown\n"}}
{"Put":{"state":"ˇThe quick brown\nfox jumps over\nthe lazy dog"}}
{"Key":"y"}
{"Key":"y"}
{"Key":"shift-v"}
{"Key":"j"}
{"Key":"$"}
{"Key":"p"}
{"Get":{"state":"ˇThe quick brown\nthe lazy dog","mode":"Normal"}}