diff options
| author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-07-30 09:01:35 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-30 09:01:35 -0400 |
| commit | 74a38c03c0e1d0668d3cdcf32e706da2a6332efb (patch) | |
| tree | 19122abd2affacb6919cc7b5b17d07b7da887a53 /src/nvim/testdir | |
| parent | d628e4250fc5f7dfc3fe1bd537ce38b6171c138c (diff) | |
| parent | 870c43c02341e5fcf51480ed168ae935a7d82fc5 (diff) | |
| download | rneovim-74a38c03c0e1d0668d3cdcf32e706da2a6332efb.tar.gz rneovim-74a38c03c0e1d0668d3cdcf32e706da2a6332efb.tar.bz2 rneovim-74a38c03c0e1d0668d3cdcf32e706da2a6332efb.zip | |
Merge pull request #14744 from janlazo/vim-8.2.2957
vim-patch:8.2.2957: using getchar() in Vim9 script is problematic
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_functions.vim | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_functions.vim b/src/nvim/testdir/test_functions.vim index 7c00b479a3..bcf2edcc93 100644 --- a/src/nvim/testdir/test_functions.vim +++ b/src/nvim/testdir/test_functions.vim @@ -1325,7 +1325,15 @@ endfunc func Test_getchar() call feedkeys('a', '') call assert_equal(char2nr('a'), getchar()) + call assert_equal(0, getchar(0)) + call assert_equal(0, getchar(1)) + call feedkeys('a', '') + call assert_equal('a', getcharstr()) + call assert_equal('', getcharstr(0)) + call assert_equal('', getcharstr(1)) + + call setline(1, 'xxxx') " call test_setmouse(1, 3) " let v:mouse_win = 9 " let v:mouse_winid = 9 @@ -1338,6 +1346,7 @@ func Test_getchar() call assert_equal(win_getid(1), v:mouse_winid) call assert_equal(1, v:mouse_lnum) call assert_equal(3, v:mouse_col) + enew! endfunc func Test_libcall_libcallnr() |