diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-04-11 10:23:33 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-11 10:23:33 +0800 |
commit | a2f157233f274599739941e39673ca4d3b0291c3 (patch) | |
tree | 35d99a3005c14b1501b91868d0af217ef3d52e3b /test/functional/terminal/helpers.lua | |
parent | 9da0023a666e83e6b9f777871553177473bfa9ce (diff) | |
download | rneovim-a2f157233f274599739941e39673ca4d3b0291c3.tar.gz rneovim-a2f157233f274599739941e39673ca4d3b0291c3.tar.bz2 rneovim-a2f157233f274599739941e39673ca4d3b0291c3.zip |
fix(tui)!: remove `ESC NUL` forced escape (#17198)
This make Nvim recognize `ESC NUL` as <M-C-Space>, as many terminal
emulators (including libvterm) send <M-C-Space> as `ESC NUL`.
There is already another unambiguous way to encode a `ESC` key supported
by libtermkey: `ESC [ 2 7 u`, which is a `CSI u` sequence.
If one still wants to use `ESC NUL` as `ESC`, they can just map
<M-C-Space> to <Esc>.
Diffstat (limited to 'test/functional/terminal/helpers.lua')
-rw-r--r-- | test/functional/terminal/helpers.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/functional/terminal/helpers.lua b/test/functional/terminal/helpers.lua index c5315d0185..51ecae663a 100644 --- a/test/functional/terminal/helpers.lua +++ b/test/functional/terminal/helpers.lua @@ -7,7 +7,9 @@ local nvim_dir = helpers.nvim_dir local feed_command, nvim = helpers.feed_command, helpers.nvim local function feed_data(data) - nvim('set_var', 'term_data', data) + -- A string containing NUL bytes is not converted to a Blob when + -- calling nvim_set_var() API, so convert it using Lua instead. + nvim('exec_lua', 'vim.g.term_data = ...', {data}) nvim('command', 'call jobsend(b:terminal_job_id, term_data)') end |