diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2023-02-26 08:32:20 +0800 |
|---|---|---|
| committer | zeertzjq <zeertzjq@outlook.com> | 2023-02-26 23:01:50 +0800 |
| commit | 5e846978e3bf85ea5ae5b505af267c01e98f6135 (patch) | |
| tree | 1c3febdfd3c66a9e95d0d38e56ec068e632ae5f7 /src/nvim/testdir | |
| parent | 48990a7077bb6767f3d218907344ee7fb0bfaaff (diff) | |
| download | rneovim-5e846978e3bf85ea5ae5b505af267c01e98f6135.tar.gz rneovim-5e846978e3bf85ea5ae5b505af267c01e98f6135.tar.bz2 rneovim-5e846978e3bf85ea5ae5b505af267c01e98f6135.zip | |
vim-patch:9.0.1354: "gr CTRL-G" stays in virtual replace mode
Problem: "gr CTRL-G" stays in virtual replace mode. (Pierre Ganty)
Solution: Prepend CTRL-V before control characters. (closes vim/vim#12045)
https://github.com/vim/vim/commit/d6a4ea3aa0d3f4a886ea900e94bf4e8ca8ae8d63
Cherry-pick Test_edit_gr_special() from patch 9.0.1347.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_edit.vim | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_edit.vim b/src/nvim/testdir/test_edit.vim index 89a9179e60..58e0232f29 100644 --- a/src/nvim/testdir/test_edit.vim +++ b/src/nvim/testdir/test_edit.vim @@ -2080,6 +2080,20 @@ func Test_edit_CTRL_hat() bwipe! endfunc +" Test "gr" followed by an Insert mode command does get out of Insert mode. +func Test_edit_gr_special() + enew + call setline(1, ['abcdef', 'xxxxxx']) + exe "normal! gr\<C-O>lx" + call assert_equal("\<C-O>def", getline(1)) + + call setline(1, 'abcdef') + exe "normal! 0gr\<C-G>lx" + call assert_equal("\<C-G>def", getline(1)) + + bwipe! +endfunc + " Weird long file name was going over the end of NameBuff func Test_edit_overlong_file_name() CheckUnix |