fix(input): allow Ctrl-C to interrupt a recursive mapping even if mapped

This commit is contained in:
zeertzjq
2022-06-07 12:08:41 +08:00
parent ab1f96e1d5
commit 56895cf4de
2 changed files with 24 additions and 5 deletions

View File

@@ -72,4 +72,23 @@ describe("CTRL-C (mapped)", function()
-- INSERT -- |
]])
end)
it('interrupts recursive mapping', function()
command('nnoremap <C-C> <Nop>')
command('nmap <F2> <Ignore><F2>')
feed('<F2>')
sleep(10)
feed('foo<C-C>')
-- wait for input buffer to be flushed
sleep(10)
feed('i')
screen:expect([[
^ |
~ |
~ |
~ |
~ |
-- INSERT -- |
]])
end)
end)