aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-04-27 17:34:40 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-04-29 15:51:04 +0800
commit78a7e2d55ccb589c26e45498ff501c64b0b17519 (patch)
tree44644e0ee9c88cb49fd8efd83e15e43c1c7aeb96 /test/functional/ui
parent3090648584024075c741fe1bee5d7a92d0543f23 (diff)
downloadrneovim-78a7e2d55ccb589c26e45498ff501c64b0b17519.tar.gz
rneovim-78a7e2d55ccb589c26e45498ff501c64b0b17519.tar.bz2
rneovim-78a7e2d55ccb589c26e45498ff501c64b0b17519.zip
vim-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 vim/vim#5266) Also fix CTRL-G in Insert mode. https://github.com/vim/vim/commit/38571a04b4eb2853f46df8884750bcb9a8115db8 Omit test as it sends terminal codes. Use a Lua test instead.
Diffstat (limited to 'test/functional/ui')
-rw-r--r--test/functional/ui/input_spec.lua18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/functional/ui/input_spec.lua b/test/functional/ui/input_spec.lua
index 43b6c19b44..d137049d55 100644
--- a/test/functional/ui/input_spec.lua
+++ b/test/functional/ui/input_spec.lua
@@ -8,6 +8,7 @@ local meths = helpers.meths
local exec_lua = helpers.exec_lua
local write_file = helpers.write_file
local funcs = helpers.funcs
+local eval = helpers.eval
local Screen = require('test.functional.ui.screen')
before_each(clear)
@@ -216,6 +217,23 @@ it('Ctrl-6 is Ctrl-^ vim-patch:8.1.2333', function()
eq('aaa', funcs.bufname())
end)
+it('c_CTRL-R_CTRL-R, i_CTRL-R_CTRL-R, i_CTRL-G_CTRL-K work properly vim-patch:8.1.2346', function()
+ command('set timeoutlen=10')
+
+ command([[let @a = 'aaa']])
+ feed([[:let x = '<C-R><C-R>a'<CR>]])
+ eq([[let x = 'aaa']], eval('@:'))
+
+ feed('a<C-R><C-R>a<Esc>')
+ expect('aaa')
+ command('bwipe!')
+
+ feed('axx<CR>yy<C-G><C-K>a<Esc>')
+ expect([[
+ axx
+ yy]])
+end)
+
it('typing a simplifiable key at hit-enter prompt triggers mapping vim-patch:8.2.0839', function()
local screen = Screen.new(60,8)
screen:set_default_attr_ids({