mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
api/nvim_replace_termcodes: Document keycodes behavior
This commit is contained in:
parent
bfb9cf1fc3
commit
bdd73fc07f
@ -135,7 +135,8 @@ Integer nvim_input(String keys)
|
||||
return (Integer)input_enqueue(keys);
|
||||
}
|
||||
|
||||
/// Replaces any terminal codes with the internal representation
|
||||
/// Replaces terminal codes and key codes (<CR>, <Esc>, ...) in a string with
|
||||
/// the internal representation.
|
||||
///
|
||||
/// @see replace_termcodes
|
||||
/// @see cpoptions
|
||||
|
@ -368,6 +368,11 @@ describe('api', function()
|
||||
'<LeftMouse>', true, true, true))
|
||||
end)
|
||||
|
||||
it('converts keycodes', function()
|
||||
eq('\nx\27x\rx<x', helpers.nvim('replace_termcodes',
|
||||
'<NL>x<Esc>x<CR>x<lt>x', true, true, true))
|
||||
end)
|
||||
|
||||
it('does not crash when transforming an empty string', function()
|
||||
-- Actually does not test anything, because current code will use NULL for
|
||||
-- an empty string.
|
||||
|
Loading…
Reference in New Issue
Block a user