fix(edit): fix K_EVENT interfering with 'digraph' (#24258)

This commit is contained in:
zeertzjq
2023-07-05 12:06:14 +08:00
committed by GitHub
parent 3ecd45ded0
commit b2e8c0df20
2 changed files with 20 additions and 1 deletions

View File

@@ -1828,6 +1828,23 @@ describe('API', function()
feed('<C-D>')
expect('a') -- recognized i_0_CTRL-D
end)
it("does not interrupt with 'digraph'", function()
command('set digraph')
feed('i,')
eq(2, eval('1+1')) -- causes K_EVENT key
feed('<BS>')
eq(2, eval('1+1')) -- causes K_EVENT key
feed('.')
expect('') -- digraph ",." worked
feed('<Esc>')
feed(':,')
eq(2, eval('1+1')) -- causes K_EVENT key
feed('<BS>')
eq(2, eval('1+1')) -- causes K_EVENT key
feed('.')
eq('', funcs.getcmdline()) -- digraph ",." worked
end)
end)
describe('nvim_get_context', function()