diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-11-26 14:28:15 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-11-26 14:28:15 +0100 |
commit | 38571a04b4eb2853f46df8884750bcb9a8115db8 (patch) | |
tree | b1d9f7ce21a909af8c54a37047e60ea74ec6329d /src/testdir | |
parent | c1faf3dc3879e8a5e486f31445b5a5753dcbc6a3 (diff) |
patch 8.1.2346: CTRL-R CTRL-R doesn't work with modifyOtherKeysv8.1.2346
Problem: CTRL-R CTRL-R doesn't work with modifyOtherKeys.
Solution: Allow key codes when fetching argument for CTRL-R. (closes #5266)
Also fix CTRL-G in Insert mode.
Diffstat (limited to 'src/testdir')
-rw-r--r-- | src/testdir/test_termcodes.vim | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/testdir/test_termcodes.vim b/src/testdir/test_termcodes.vim index 2678dae292..05f0d18df4 100644 --- a/src/testdir/test_termcodes.vim +++ b/src/testdir/test_termcodes.vim @@ -1209,6 +1209,27 @@ func Test_modifyOtherKeys_basic() call RunTest_modifyOtherKeys(function('GetEscCodeCSIu')) endfunc +func Test_modifyOtherKeys_no_mapping() + set timeoutlen=10 + + let @a = 'aaa' + call feedkeys(":let x = '" .. GetEscCodeCSI27('R', 5) .. GetEscCodeCSI27('R', 5) .. "a'\<CR>", 'Lx!') + call assert_equal("let x = 'aaa'", @:) + + new + call feedkeys("a" .. GetEscCodeCSI27('R', 5) .. GetEscCodeCSI27('R', 5) .. "a\<Esc>", 'Lx!') + call assert_equal("aaa", getline(1)) + bwipe! + + new + call feedkeys("axx\<CR>yy" .. GetEscCodeCSI27('G', 5) .. GetEscCodeCSI27('K', 5) .. "a\<Esc>", 'Lx!') + call assert_equal("axx", getline(1)) + call assert_equal("yy", getline(2)) + bwipe! + + set timeoutlen& +endfunc + func RunTest_mapping_shift(key, func) call setline(1, '') if a:key == '|' |