zed/crates/vim/test_data/test_normal_command.json
AidanV d2b31b47b6
vim: Allow trailing whitespace for :norm command (#46403)
Fix a bug with `:norm` that disallowed trailing whitespace.

Commands that accept generic args (defined with `args()`) now preserve
trailing whitespace, while commands that accept filenames (defined with
`filename()`) have whitespace pre-trimmed. This allows, for example, 
`:norm I  ` to correctly insert spaces, matching NeoVim's behavior.

Release Notes:

- vim: Fixed `:norm` command to preserve trailing whitespace in
arguments (e.g., `:norm I ` now correctly inserts two spaces)

---------

Co-authored-by: dino <dinojoaocosta@gmail.com>
2026-01-13 14:13:15 +00:00

92 lines
1.9 KiB
JSON

{"Put":{"state":"The quick\nbrown« fox\njumpsˇ» over\nthe lazy dog\n"}}
{"Key":":"}
{"Key":"n"}
{"Key":"o"}
{"Key":"r"}
{"Key":"m"}
{"Key":"space"}
{"Key":"w"}
{"Key":"C"}
{"Key":"w"}
{"Key":"o"}
{"Key":"r"}
{"Key":"d"}
{"Key":"enter"}
{"Get":{"state":"The quick\nbrown word\njumps worˇd\nthe lazy dog\n","mode":"Normal"}}
{"Key":":"}
{"Key":"n"}
{"Key":"o"}
{"Key":"r"}
{"Key":"m"}
{"Key":"space"}
{"Key":"_"}
{"Key":"w"}
{"Key":"c"}
{"Key":"i"}
{"Key":"w"}
{"Key":"t"}
{"Key":"e"}
{"Key":"s"}
{"Key":"t"}
{"Key":"enter"}
{"Get":{"state":"The quick\nbrown word\njumps tesˇt\nthe lazy dog\n","mode":"Normal"}}
{"Key":"_"}
{"Key":"l"}
{"Key":"v"}
{"Key":"l"}
{"Key":":"}
{"Key":"n"}
{"Key":"o"}
{"Key":"r"}
{"Key":"m"}
{"Key":"space"}
{"Key":"s"}
{"Key":"l"}
{"Key":"a"}
{"Key":"enter"}
{"Get":{"state":"The quick\nbrown word\nlˇaumps test\nthe lazy dog\n","mode":"Normal"}}
{"Put":{"state":"ˇThe quick\nbrown fox\njumps over\nthe lazy dog\n"}}
{"Key":"c"}
{"Key":"i"}
{"Key":"w"}
{"Key":"M"}
{"Key":"y"}
{"Key":"escape"}
{"Get":{"state":"Mˇy quick\nbrown fox\njumps over\nthe lazy dog\n","mode":"Normal"}}
{"Key":":"}
{"Key":"n"}
{"Key":"o"}
{"Key":"r"}
{"Key":"m"}
{"Key":"space"}
{"Key":"u"}
{"Key":"enter"}
{"Get":{"state":"ˇThe quick\nbrown fox\njumps over\nthe lazy dog\n","mode":"Normal"}}
{"Put":{"state":"The« quick\nbrownˇ» fox\njumps over\nthe lazy dog\n"}}
{"Key":":"}
{"Key":"n"}
{"Key":"o"}
{"Key":"r"}
{"Key":"m"}
{"Key":"space"}
{"Key":"I"}
{"Key":"1"}
{"Key":"2"}
{"Key":"3"}
{"Key":"enter"}
{"Key":"u"}
{"Get":{"state":"ˇThe quick\nbrown fox\njumps over\nthe lazy dog\n","mode":"Normal"}}
{"Put":{"state":"ˇquick\nbrown fox\njumps over\nthe lazy dog\n"}}
{"Key":":"}
{"Key":"n"}
{"Key":"o"}
{"Key":"r"}
{"Key":"m"}
{"Key":"space"}
{"Key":"I"}
{"Key":"T"}
{"Key":"h"}
{"Key":"e"}
{"Key":"space"}
{"Key":"enter"}
{"Get":{"state":"Theˇ quick\nbrown fox\njumps over\nthe lazy dog\n","mode":"Normal"}}