patch 9.1.0597: KeyInputPre cannot get the (unmapped typed) key
Problem: KeyInputPre cannot get the (unmapped typed) key
(after v9.1.0563)
Solution: Add the "typedchar" property to the v:event dict
(Shougo Matsushita)
closes: #15231
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/testdir/test_autocmd.vim b/src/testdir/test_autocmd.vim
index 5ad1730..26590ab 100644
--- a/src/testdir/test_autocmd.vim
+++ b/src/testdir/test_autocmd.vim
@@ -4820,6 +4820,15 @@
call feedkeys('j', 'nx')
au! KeyInputPre
+
+ " Test for v:event.typedchar
+ nnoremap j k
+ au KeyInputPre n
+ \ call assert_equal(v:event.typedchar, 'j')
+ \ | call assert_equal(v:char, 'k')
+ call feedkeys('j', 'tx')
+
+ au! KeyInputPre
endfunc
" vim: shiftwidth=2 sts=2 expandtab