aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-02-21 06:04:56 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-02-21 06:06:01 +0800
commit3828fb7ea431c9ceec815c41aed89c50ab9712f5 (patch)
tree117eaed1e946468ab1b65bf4ce503b975562d5f2 /src/nvim/testdir
parentd80c9b925973be87d1d5a2e948d65907234b2134 (diff)
downloadrneovim-3828fb7ea431c9ceec815c41aed89c50ab9712f5.tar.gz
rneovim-3828fb7ea431c9ceec815c41aed89c50ab9712f5.tar.bz2
rneovim-3828fb7ea431c9ceec815c41aed89c50ab9712f5.zip
vim-patch:8.2.4427: getchar() may return modifiers if no character is available
Problem: getchar() may return modifiers if no character is available. Solution: Do not process modifiers when there is no character. (closes vim/vim#9806) https://github.com/vim/vim/commit/ad6c45f62558e03d3e3a927b3fe4dbaf30a36bef
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_functions.vim4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_functions.vim b/src/nvim/testdir/test_functions.vim
index 6e36f4e3d2..994d74601a 100644
--- a/src/nvim/testdir/test_functions.vim
+++ b/src/nvim/testdir/test_functions.vim
@@ -1451,6 +1451,10 @@ func Test_getchar()
call assert_equal('', getcharstr(0))
call assert_equal('', getcharstr(1))
+ call feedkeys("\<M-F2>", '')
+ call assert_equal("\<M-F2>", getchar(0))
+ call assert_equal(0, getchar(0))
+
call setline(1, 'xxxx')
" call test_setmouse(1, 3)
" let v:mouse_win = 9