vim: Fix insert before in visual modes (#25603)

Closes #22536

Changes:
- Visual and visual block: Cursor at start of selection.
- Visual line: Cursor at start on line.
- Uses different handling since the selection does not actually change
in vline.

Release Notes:

- vim: Fixed insert before (`shift-i`) in visual modes.
This commit is contained in:
brian tan 2025-03-04 23:58:01 -05:00 committed by GitHub
parent 9c7eee24bc
commit ff0bb1f389
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 60 additions and 0 deletions

View file

@ -0,0 +1,14 @@
{"Put":{"state":"heˇllo"}}
{"Key":"v"}
{"Key":"i"}
{"Key":"w"}
{"Key":"shift-i"}
{"Get":{"state":"ˇhello","mode":"Insert"}}
{"Put":{"state":"The quick brown\nfox ˇjumps over\nthe lazy dog"}}
{"Key":"shift-v"}
{"Key":"shift-i"}
{"Get":{"state":"The quick brown\nˇfox jumps over\nthe lazy dog","mode":"Insert"}}
{"Put":{"state":"The quick brown\nfox ˇjumps over\nthe lazy dog"}}
{"Key":"shift-v"}
{"Key":"shift-a"}
{"Get":{"state":"The quick brown\nfox jˇumps over\nthe lazy dog","mode":"Insert"}}