diff options
author | bfredl <bjorn.linse@gmail.com> | 2022-01-23 19:40:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-23 19:40:59 +0100 |
commit | f20bd439df2c0f487ccfe2460ebceb05b5257920 (patch) | |
tree | 250988159dc428e5dbf8f0d3f6a28db03ed604bf /test/functional/editor/meta_key_spec.lua | |
parent | 4ba7fa1700ead8a53d73fea7fc17a545f9b4588d (diff) | |
parent | 0efe1ec6b3a869cdfceb2ab98b230b52374a17ae (diff) | |
download | rneovim-f20bd439df2c0f487ccfe2460ebceb05b5257920.tar.gz rneovim-f20bd439df2c0f487ccfe2460ebceb05b5257920.tar.bz2 rneovim-f20bd439df2c0f487ccfe2460ebceb05b5257920.zip |
Merge pull request #17168 from zeertzjq/ins-char-typebuf-mods
fix(input): put modifiers back into typeahead buffer when needed
Diffstat (limited to 'test/functional/editor/meta_key_spec.lua')
-rw-r--r-- | test/functional/editor/meta_key_spec.lua | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/test/functional/editor/meta_key_spec.lua b/test/functional/editor/meta_key_spec.lua index 2280f5bb24..f811b8ae8d 100644 --- a/test/functional/editor/meta_key_spec.lua +++ b/test/functional/editor/meta_key_spec.lua @@ -27,6 +27,14 @@ describe('meta-keys #8226 #13042', function() command('nnoremap <A-j> Aalt-j<Esc>') feed('<A-j><M-l>') expect('llo<ESC>;<ESC>;alt-jmeta-l') + -- Unmapped ALT-chord with characters containing K_SPECIAL bytes + command('nnoremap … A…<Esc>') + feed('<A-…><M-…>') + expect('llo<ESC>;<ESC>;alt-jmeta-l<ESC>…<ESC>…') + command("execute 'nnoremap' nr2char(0x40000000) 'AMAX<Esc>'") + command("call nvim_input('<A-'.nr2char(0x40000000).'>')") + command("call nvim_input('<M-'.nr2char(0x40000000).'>')") + expect('llo<ESC>;<ESC>;alt-jmeta-l<ESC>…<ESC>…<ESC>MAX<ESC>MAX') end) it('ALT/META, visual-mode', function() @@ -36,13 +44,20 @@ describe('meta-keys #8226 #13042', function() expect('peach') -- Unmapped ALT-chord resolves isolated (non-ALT) ESC mapping. #13086 #15869 command('vnoremap <ESC> A<lt>ESC>') - feed('viw<A-;><ESC>viw<M-;><ESC>') + feed('viw<A-;><Esc>viw<M-;><Esc>') expect('peach<ESC>;<ESC>;') -- Mapped ALT-chord behaves as mapped. command('vnoremap <M-l> Ameta-l<Esc>') command('vnoremap <A-j> Aalt-j<Esc>') feed('viw<A-j>viw<M-l>') expect('peach<ESC>;<ESC>;alt-jmeta-l') + -- Unmapped ALT-chord with characters containing K_SPECIAL bytes + feed('viw<A-…><Esc>viw<M-…><Esc>') + expect('peach<ESC>;<ESC>;alt-jmeta-l<ESC>…<ESC>…') + command("execute 'inoremap' nr2char(0x40000000) 'MAX'") + command("call nvim_input('viw<A-'.nr2char(0x40000000).'><Esc>')") + command("call nvim_input('viw<M-'.nr2char(0x40000000).'><Esc>')") + expect('peach<ESC>;<ESC>;alt-jmeta-l<ESC>…<ESC>…<ESC>MAX<ESC>MAX') end) it('ALT/META insert-mode', function() |