comparison src/testdir/test_termcodes.vim @ 18709:ac08c7ad9d37 v8.1.2346

patch 8.1.2346: CTRL-R CTRL-R doesn't work with modifyOtherKeys Commit: https://github.com/vim/vim/commit/38571a04b4eb2853f46df8884750bcb9a8115db8 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Nov 26 14:28:15 2019 +0100 patch 8.1.2346: CTRL-R CTRL-R doesn't work with modifyOtherKeys Problem: CTRL-R CTRL-R doesn't work with modifyOtherKeys. Solution: Allow key codes when fetching argument for CTRL-R. (closes https://github.com/vim/vim/issues/5266) Also fix CTRL-G in Insert mode.
author Bram Moolenaar <Bram@vim.org>
date Tue, 26 Nov 2019 14:30:03 +0100
parents 5ed740336224
children 14d2a210fab1
comparison
equal deleted inserted replaced
18708:52a0de9daaed 18709:ac08c7ad9d37
1207 func Test_modifyOtherKeys_basic() 1207 func Test_modifyOtherKeys_basic()
1208 call RunTest_modifyOtherKeys(function('GetEscCodeCSI27')) 1208 call RunTest_modifyOtherKeys(function('GetEscCodeCSI27'))
1209 call RunTest_modifyOtherKeys(function('GetEscCodeCSIu')) 1209 call RunTest_modifyOtherKeys(function('GetEscCodeCSIu'))
1210 endfunc 1210 endfunc
1211 1211
1212 func Test_modifyOtherKeys_no_mapping()
1213 set timeoutlen=10
1214
1215 let @a = 'aaa'
1216 call feedkeys(":let x = '" .. GetEscCodeCSI27('R', 5) .. GetEscCodeCSI27('R', 5) .. "a'\<CR>", 'Lx!')
1217 call assert_equal("let x = 'aaa'", @:)
1218
1219 new
1220 call feedkeys("a" .. GetEscCodeCSI27('R', 5) .. GetEscCodeCSI27('R', 5) .. "a\<Esc>", 'Lx!')
1221 call assert_equal("aaa", getline(1))
1222 bwipe!
1223
1224 new
1225 call feedkeys("axx\<CR>yy" .. GetEscCodeCSI27('G', 5) .. GetEscCodeCSI27('K', 5) .. "a\<Esc>", 'Lx!')
1226 call assert_equal("axx", getline(1))
1227 call assert_equal("yy", getline(2))
1228 bwipe!
1229
1230 set timeoutlen&
1231 endfunc
1232
1212 func RunTest_mapping_shift(key, func) 1233 func RunTest_mapping_shift(key, func)
1213 call setline(1, '') 1234 call setline(1, '')
1214 if a:key == '|' 1235 if a:key == '|'
1215 exe 'inoremap \| xyz' 1236 exe 'inoremap \| xyz'
1216 else 1237 else