1
0
forked from aniani/vim

patch 9.1.0580: :lmap mapping for keypad key not applied when typed in Select mode

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: #15245

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
zeertzjq
2024-07-13 19:06:44 +02:00
committed by Christian Brabandt
parent d1b5ea984d
commit 90a800274d
3 changed files with 55 additions and 37 deletions

View File

@@ -321,4 +321,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