diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-07-14 06:50:36 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-14 06:50:36 +0800 |
commit | 49ba36becd0bbf1052802b846f418aee673b28a5 (patch) | |
tree | 78bb307b3e04463c54682510be43c1799672419f /test | |
parent | 1f748d46c3ef288b2d9a8b7dd2c9c931ed4f0059 (diff) | |
download | rneovim-49ba36becd0bbf1052802b846f418aee673b28a5.tar.gz rneovim-49ba36becd0bbf1052802b846f418aee673b28a5.tar.bz2 rneovim-49ba36becd0bbf1052802b846f418aee673b28a5.zip |
vim-patch:9.1.0580: :lmap mapping for keypad key not applied when typed in Select mode (#29693)
Problem: An :lmap mapping for a printable keypad key is not applied
when typing it in Select mode.
Solution: Change keypad key to ASCII after setting vgetc_char.
(zeertzjq)
closes: vim/vim#15245
https://github.com/vim/vim/commit/90a800274ded86d5d79dbea7ba647cd69b029b4e
Diffstat (limited to 'test')
-rw-r--r-- | test/old/testdir/test_selectmode.vim | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/old/testdir/test_selectmode.vim b/test/old/testdir/test_selectmode.vim index 59a1deba65..34ccdae7d8 100644 --- a/test/old/testdir/test_selectmode.vim +++ b/test/old/testdir/test_selectmode.vim @@ -323,4 +323,20 @@ func Test_ins_ctrl_o_in_insert_mode_resets_selectmode() bwipe! endfunc +" Test that an :lmap mapping for a printable keypad key is applied when typing +" it in Select mode. +func Test_selectmode_keypad_lmap() + new + lnoremap <buffer> <kPoint> ??? + lnoremap <buffer> <kEnter> !!! + setlocal iminsert=1 + call setline(1, 'abcdef') + call feedkeys("gH\<kPoint>\<Esc>", 'tx') + call assert_equal(['???'], getline(1, '$')) + call feedkeys("gH\<kEnter>\<Esc>", 'tx') + call assert_equal(['!!!'], getline(1, '$')) + + bwipe! +endfunc + " vim: shiftwidth=2 sts=2 expandtab |