diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-05-08 00:41:18 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2023-05-08 01:12:09 +0800 |
commit | 5844af0d524956b55100e4350934237e4a12a147 (patch) | |
tree | 5d9f239d6421d94f2327df672500332ec72b099f /test | |
parent | 32331378134599ece34298f866889b4b311d7b79 (diff) | |
download | rneovim-5844af0d524956b55100e4350934237e4a12a147.tar.gz rneovim-5844af0d524956b55100e4350934237e4a12a147.tar.bz2 rneovim-5844af0d524956b55100e4350934237e4a12a147.zip |
vim-patch:9.0.1521: failing redo of command with control characters
Problem: Failing redo of command with control characters.
Solution: Use AppendToRedobuffLit() for colon commands. (closes vim/vim#12354)
https://github.com/vim/vim/commit/30b6d6104c3d541c41c868989c020b743e01af08
Diffstat (limited to 'test')
-rw-r--r-- | test/old/testdir/test_normal.vim | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/test/old/testdir/test_normal.vim b/test/old/testdir/test_normal.vim index 330a16dffb..a854c9538f 100644 --- a/test/old/testdir/test_normal.vim +++ b/test/old/testdir/test_normal.vim @@ -3648,11 +3648,32 @@ func Test_horiz_motion() bwipe! endfunc -" Test for using a : command in operator pending mode +" Test for using a ":" command in operator pending mode func Test_normal_colon_op() new call setline(1, ['one', 'two']) call assert_beeps("normal! Gc:d\<CR>") + call assert_equal(['one'], getline(1, '$')) + + call setline(1, ['one…two…three!']) + normal! $ + " Using ":" as a movement is characterwise exclusive + call feedkeys("d:normal! F…\<CR>", 'xt') + call assert_equal(['one…two!'], getline(1, '$')) + " Check that redoing a command with 0x80 bytes works + call feedkeys('.', 'xt') + call assert_equal(['one!'], getline(1, '$')) + + call setline(1, ['one', 'two', 'three', 'four', 'five']) + " Add this to the command history + call feedkeys(":normal! G0\<CR>", 'xt') + " Use :normal! with control characters in operator pending mode + call feedkeys("d:normal! \<C-V>\<C-P>\<C-V>\<C-P>\<CR>", 'xt') + call assert_equal(['one', 'two', 'five'], getline(1, '$')) + " Check that redoing a command with control characters works + call feedkeys('.', 'xt') + call assert_equal(['five'], getline(1, '$')) + bwipe! endfunc |