diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-09-25 06:23:42 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-25 06:23:42 +0800 |
commit | 9154fc76b740c4b61ad78a1cb7620c7e1b6d0494 (patch) | |
tree | 82425fcd5e3482cd45c12bdb5ca444be2174c759 | |
parent | 9b8f65d03a920111f8a4aa5fc8487a086f54d231 (diff) | |
download | rneovim-9154fc76b740c4b61ad78a1cb7620c7e1b6d0494.tar.gz rneovim-9154fc76b740c4b61ad78a1cb7620c7e1b6d0494.tar.bz2 rneovim-9154fc76b740c4b61ad78a1cb7620c7e1b6d0494.zip |
vim-patch:9.0.1937: missing test for mouse click + 'virtedit' (#25347)
Problem: missing test for mouse click + 'virtedit'
Solution: Add test for clicking after eol with 'virtualedit' and wrapped
line
closes: vim/vim#13157
https://github.com/vim/vim/commit/46a0582ffa4ea79b112ac01e25adccf93b49cd9d
-rw-r--r-- | test/old/testdir/test_virtualedit.vim | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/old/testdir/test_virtualedit.vim b/test/old/testdir/test_virtualedit.vim index 4ab69d89fe..4780faa706 100644 --- a/test/old/testdir/test_virtualedit.vim +++ b/test/old/testdir/test_virtualedit.vim @@ -598,6 +598,9 @@ func Test_virtualedit_mouse() call Ntest_setmouse(row, 21 + 15) call feedkeys("\<LeftMouse>", "xt") call assert_equal([0, 1, 10, 2, 15], getcurpos()) + call Ntest_setmouse(row, 21 + 20) + call feedkeys("\<LeftMouse>", "xt") + call assert_equal([0, 1, 10, 7, 20], getcurpos()) setlocal nowrap call setline(2, repeat('a', 19)) @@ -654,6 +657,23 @@ func Test_virtualedit_mouse() sign undefine Sign1 endif + wincmd h + 4wincmd > + normal! gg24I. + redraw + call Ntest_setmouse(row + 1, 12) + call feedkeys("\<LeftMouse>", "xt") + call assert_equal([0, 1, 24 + 9, 0, 24 + 12], getcurpos()) + call Ntest_setmouse(row + 1, 13) + call feedkeys("\<LeftMouse>", "xt") + call assert_equal([0, 1, 24 + 10, 0, 24 + 13], getcurpos()) + call Ntest_setmouse(row + 1, 15) + call feedkeys("\<LeftMouse>", "xt") + call assert_equal([0, 1, 24 + 10, 2, 24 + 15], getcurpos()) + call Ntest_setmouse(row + 1, 20) + call feedkeys("\<LeftMouse>", "xt") + call assert_equal([0, 1, 24 + 10, 7, 24 + 20], getcurpos()) + bwipe! let &mouse = save_mouse set virtualedit& |