fix(keycodes): recognize <t_xx> as a key (#24700)

Problem:    The result of keytrans() sometimes can't be translated back.
Solution:   Recognize <t_xx> as a key.
This commit is contained in:
zeertzjq
2023-08-13 22:14:48 +08:00
committed by GitHub
parent cbf54ec2a5
commit 017ff93b02
2 changed files with 10 additions and 0 deletions

View File

@@ -1957,6 +1957,12 @@ describe('API', function()
-- value.
eq('', meths.replace_termcodes('', true, true, true))
end)
-- Not exactly the case, as nvim_replace_termcodes() escapes K_SPECIAL in Unicode
it('translates the result of keytrans() on string with 0x80 byte back', function()
local s = 'ff\128\253\097tt'
eq(s, meths.replace_termcodes(funcs.keytrans(s), true, true, true))
end)
end)
describe('nvim_feedkeys', function()