aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/input_spec.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-04-25 21:40:46 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-04-29 15:51:04 +0800
commit66747f18ded775e2c0b6bac73cee18a3752086af (patch)
treed0a25e517a61819d379115c7237080e284e90beb /test/functional/ui/input_spec.lua
parent82a13a78bb26e91d9f81231ab5e725129cfd8757 (diff)
downloadrneovim-66747f18ded775e2c0b6bac73cee18a3752086af.tar.gz
rneovim-66747f18ded775e2c0b6bac73cee18a3752086af.tar.bz2
rneovim-66747f18ded775e2c0b6bac73cee18a3752086af.zip
vim-patch:8.2.0839: dropping modifier when putting a character back in typeahead
Problem: Dropping modifier when putting a character back in typeahead. Solution: Add modifier to ins_char_typebuf(). (closes vim/vim#6158) https://github.com/vim/vim/commit/b42c0d54279b1fdb79652db0c84171e213458809 Vim's test doesn't seem to work properly as the hit-enter prompt seems to be delayed. Add a Lua screen test.
Diffstat (limited to 'test/functional/ui/input_spec.lua')
-rw-r--r--test/functional/ui/input_spec.lua33
1 files changed, 33 insertions, 0 deletions
diff --git a/test/functional/ui/input_spec.lua b/test/functional/ui/input_spec.lua
index 8925dda730..799aad8d55 100644
--- a/test/functional/ui/input_spec.lua
+++ b/test/functional/ui/input_spec.lua
@@ -216,6 +216,39 @@ it('Ctrl-6 is Ctrl-^ vim-patch:8.1.2333', function()
eq('aaa', funcs.bufname())
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({
+ [1] = {bold = true, foreground = Screen.colors.Blue}, -- NonText
+ [2] = {bold = true, reverse = true}, -- MsgSeparator
+ [3] = {bold = true, foreground = Screen.colors.SeaGreen}, -- MoreMsg
+ })
+ screen:attach()
+ command([[nnoremap <C-6> <Cmd>echo 'hit ctrl-6'<CR>]])
+ feed_command('ls')
+ screen:expect([[
+ |
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {2: }|
+ :ls |
+ 1 %a "[No Name]" line 1 |
+ {3:Press ENTER or type command to continue}^ |
+ ]])
+ feed('<C-6>')
+ screen:expect([[
+ ^ |
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ hit ctrl-6 |
+ ]])
+end)
+
describe('input non-printable chars', function()
after_each(function()
os.remove('Xtest-overwrite')