diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2016-01-11 00:48:28 -0500 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2016-01-11 00:48:28 -0500 |
commit | 3b94756feb39ad269104b2f765c6c56ff2360203 (patch) | |
tree | ae1e784bfc3755f4075e8b12564732d21f92a40b /test | |
parent | 223aafb1a75c9ece9a2283a887b7539a3b771550 (diff) | |
parent | 317d5ca7b0f92ef42de989b3556ca9503f0a3bf6 (diff) | |
download | rneovim-3b94756feb39ad269104b2f765c6c56ff2360203.tar.gz rneovim-3b94756feb39ad269104b2f765c6c56ff2360203.tar.bz2 rneovim-3b94756feb39ad269104b2f765c6c56ff2360203.zip |
Merge pull request #3982 from justinmk/nohighbit
input: Do not set high-bit. Preserve META modifier.
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/terminal/tui_spec.lua | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/test/functional/terminal/tui_spec.lua b/test/functional/terminal/tui_spec.lua index 14700a2622..838d05a6df 100644 --- a/test/functional/terminal/tui_spec.lua +++ b/test/functional/terminal/tui_spec.lua @@ -53,7 +53,7 @@ describe('tui', function() ]]) end) - it('interprets leading esc byte as the alt modifier', function() + it('interprets leading <Esc> byte as ALT modifier in normal-mode', function() local keys = 'dfghjkl' for c in keys:gmatch('.') do execute('nnoremap <a-'..c..'> ialt-'..c..'<cr><esc>') @@ -80,6 +80,25 @@ describe('tui', function() ]]) end) + it('does not mangle unmapped ALT-key chord', function() + -- Vim represents ALT/META by setting the "high bit" of the modified key; + -- we do _not_. #3982 + -- + -- Example: for input ALT+j: + -- * Vim (Nvim prior to #3982) sets high-bit, inserts "ê". + -- * Nvim (after #3982) inserts "j". + feed('i\x1bj') + screen:expect([[ + j{1: } | + ~ | + ~ | + ~ | + [No Name] [+] | + -- INSERT -- | + -- TERMINAL -- | + ]]) + end) + it('accepts ascii control sequences', function() feed('i') feed('\x16\x07') -- ctrl+g |