diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2023-09-21 12:05:08 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-21 12:05:08 +0800 |
| commit | 0aea8fad48ccd891022a5595fc7cdedbe4c04ad3 (patch) | |
| tree | f4273000589b33ed5b98990e22d766f904428de4 /test/old/testdir/test_normal.vim | |
| parent | f094db0e5ccaddca2b5db05bf9545d55f3eededf (diff) | |
| parent | e25cf47ad3e10e0e1ae2b2376d898382af5b1e26 (diff) | |
| download | rneovim-0aea8fad48ccd891022a5595fc7cdedbe4c04ad3.tar.gz rneovim-0aea8fad48ccd891022a5595fc7cdedbe4c04ad3.tar.bz2 rneovim-0aea8fad48ccd891022a5595fc7cdedbe4c04ad3.zip | |
Merge pull request #25281 from zeertzjq/vim-9.0.1919
vim-patch:9.0.1919: Wrong curswant when clicking on empty line or with vsplits
Diffstat (limited to 'test/old/testdir/test_normal.vim')
| -rw-r--r-- | test/old/testdir/test_normal.vim | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/test/old/testdir/test_normal.vim b/test/old/testdir/test_normal.vim index 3c21041899..09d3f0432f 100644 --- a/test/old/testdir/test_normal.vim +++ b/test/old/testdir/test_normal.vim @@ -4107,6 +4107,39 @@ func Test_normal_click_on_double_width_char() let &mouse = save_mouse endfunc +func Test_normal_click_on_empty_line() + let save_mouse = &mouse + set mouse=a + botright new + call setline(1, ['', '', '']) + let row = win_screenpos(0)[0] + 2 + 20vsplit + redraw + + call Ntest_setmouse(row, 1) + call feedkeys("\<LeftMouse>", 'xt') + call assert_equal([0, 3, 1, 0, 1], getcurpos()) + call Ntest_setmouse(row, 2) + call feedkeys("\<LeftMouse>", 'xt') + call assert_equal([0, 3, 1, 0, 2], getcurpos()) + call Ntest_setmouse(row, 10) + call feedkeys("\<LeftMouse>", 'xt') + call assert_equal([0, 3, 1, 0, 10], getcurpos()) + + call Ntest_setmouse(row, 21 + 1) + call feedkeys("\<LeftMouse>", 'xt') + call assert_equal([0, 3, 1, 0, 1], getcurpos()) + call Ntest_setmouse(row, 21 + 2) + call feedkeys("\<LeftMouse>", 'xt') + call assert_equal([0, 3, 1, 0, 2], getcurpos()) + call Ntest_setmouse(row, 21 + 10) + call feedkeys("\<LeftMouse>", 'xt') + call assert_equal([0, 3, 1, 0, 10], getcurpos()) + + bwipe! + let &mouse = save_mouse +endfunc + func Test_normal33_g_cmd_nonblank() " Test that g<End> goes to the last non-blank char and g$ to the last " visible column |