vim: Fix add empty line (#30987)

Fixes: 

`] space` does not consume counts, and it gets applied to the next
action.

`] space` on an empty line causes cursor to move to the next line.

Release Notes:

- N/A
This commit is contained in:
5brian 2025-06-02 11:49:31 -04:00 committed by GitHub
parent b363e1a482
commit a6544c70c5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 138 additions and 28 deletions

View file

@ -0,0 +1,78 @@
{"Put":{"state":"ˇ"}}
{"Key":"["}
{"Key":"space"}
{"Get":{"state":"\nˇ","mode":"Normal"}}
{"Put":{"state":"The ˇquick"}}
{"Key":"["}
{"Key":"space"}
{"Get":{"state":"\nThe ˇquick","mode":"Normal"}}
{"Put":{"state":"The qˇuick\nbrown fox\njumps over"}}
{"Key":"3"}
{"Key":"["}
{"Key":"space"}
{"Get":{"state":"\n\n\nThe qˇuick\nbrown fox\njumps over","mode":"Normal"}}
{"Put":{"state":"The quick\nbrown ˇfox\njumps over"}}
{"Key":"3"}
{"Key":"["}
{"Key":"space"}
{"Get":{"state":"The quick\n\n\n\nbrown ˇfox\njumps over","mode":"Normal"}}
{"Put":{"state":"The quick\nbrown fox\njumps ˇover"}}
{"Key":"3"}
{"Key":"["}
{"Key":"space"}
{"Get":{"state":"The quick\nbrown fox\n\n\n\njumps ˇover","mode":"Normal"}}
{"Put":{"state":"The qˇuick\nbrown fox\njumps over"}}
{"Key":"["}
{"Key":"space"}
{"Get":{"state":"\nThe qˇuick\nbrown fox\njumps over","mode":"Normal"}}
{"Put":{"state":"The quick\nbrown ˇfox\njumps over"}}
{"Key":"["}
{"Key":"space"}
{"Get":{"state":"The quick\n\nbrown ˇfox\njumps over","mode":"Normal"}}
{"Put":{"state":"The quick\nbrown fox\njumps ˇover"}}
{"Key":"["}
{"Key":"space"}
{"Get":{"state":"The quick\nbrown fox\n\njumps ˇover","mode":"Normal"}}
{"Put":{"state":"The quick\nˇ\nbrown fox"}}
{"Key":"["}
{"Key":"space"}
{"Get":{"state":"The quick\n\nˇ\nbrown fox","mode":"Normal"}}
{"Put":{"state":"ˇ"}}
{"Key":"]"}
{"Key":"space"}
{"Get":{"state":"ˇ\n","mode":"Normal"}}
{"Put":{"state":"The ˇquick"}}
{"Key":"]"}
{"Key":"space"}
{"Get":{"state":"The ˇquick\n","mode":"Normal"}}
{"Put":{"state":"The qˇuick\nbrown fox\njumps over"}}
{"Key":"3"}
{"Key":"]"}
{"Key":"space"}
{"Get":{"state":"The qˇuick\n\n\n\nbrown fox\njumps over","mode":"Normal"}}
{"Put":{"state":"The quick\nbrown ˇfox\njumps over"}}
{"Key":"3"}
{"Key":"]"}
{"Key":"space"}
{"Get":{"state":"The quick\nbrown ˇfox\n\n\n\njumps over","mode":"Normal"}}
{"Put":{"state":"The quick\nbrown fox\njumps ˇover"}}
{"Key":"3"}
{"Key":"]"}
{"Key":"space"}
{"Get":{"state":"The quick\nbrown fox\njumps ˇover\n\n\n","mode":"Normal"}}
{"Put":{"state":"The qˇuick\nbrown fox\njumps over"}}
{"Key":"]"}
{"Key":"space"}
{"Get":{"state":"The qˇuick\n\nbrown fox\njumps over","mode":"Normal"}}
{"Put":{"state":"The quick\nbrown ˇfox\njumps over"}}
{"Key":"]"}
{"Key":"space"}
{"Get":{"state":"The quick\nbrown ˇfox\n\njumps over","mode":"Normal"}}
{"Put":{"state":"The quick\nbrown fox\njumps ˇover"}}
{"Key":"]"}
{"Key":"space"}
{"Get":{"state":"The quick\nbrown fox\njumps ˇover\n","mode":"Normal"}}
{"Put":{"state":"The quick\nˇ\nbrown fox"}}
{"Key":"]"}
{"Key":"space"}
{"Get":{"state":"The quick\nˇ\n\nbrown fox","mode":"Normal"}}

View file

@ -1,24 +0,0 @@
{"Put":{"state":"ˇ"}}
{"Key":"["}
{"Key":"space"}
{"Get":{"state":"\nˇ","mode":"Normal"}}
{"Put":{"state":"The ˇquick"}}
{"Key":"["}
{"Key":"space"}
{"Get":{"state":"\nThe ˇquick","mode":"Normal"}}
{"Put":{"state":"The qˇuick\nbrown fox\njumps over"}}
{"Key":"["}
{"Key":"space"}
{"Get":{"state":"\nThe qˇuick\nbrown fox\njumps over","mode":"Normal"}}
{"Put":{"state":"The quick\nbrown ˇfox\njumps over"}}
{"Key":"["}
{"Key":"space"}
{"Get":{"state":"The quick\n\nbrown ˇfox\njumps over","mode":"Normal"}}
{"Put":{"state":"The quick\nbrown fox\njumps ˇover"}}
{"Key":"["}
{"Key":"space"}
{"Get":{"state":"The quick\nbrown fox\n\njumps ˇover","mode":"Normal"}}
{"Put":{"state":"The quick\nˇ\nbrown fox"}}
{"Key":"["}
{"Key":"space"}
{"Get":{"state":"The quick\n\nˇ\nbrown fox","mode":"Normal"}}