# HG changeset patch # User Christian Brabandt # Date 1695591903 -7200 # Node ID f47ee07ae029c0a2eed526033a432c5d857cafb3 # Parent 595100ac23af41eefee66680c9690c2a0674eb69 patch 9.0.1937: missing test for mouse click + 'virtedit' Commit: https://github.com/vim/vim/commit/46a0582ffa4ea79b112ac01e25adccf93b49cd9d Author: zeertzjq Date: Sun Sep 24 23:30:03 2023 +0200 patch 9.0.1937: missing test for mouse click + 'virtedit' Problem: missing test for mouse click + 'virtedit' Solution: Add test for clicking after eol with 'virtualedit' and wrapped line closes: #13157 Signed-off-by: Christian Brabandt Co-authored-by: zeertzjq diff --git a/src/testdir/test_virtualedit.vim b/src/testdir/test_virtualedit.vim --- a/src/testdir/test_virtualedit.vim +++ b/src/testdir/test_virtualedit.vim @@ -598,6 +598,9 @@ func Test_virtualedit_mouse() call test_setmouse(row, 21 + 15) call feedkeys("\", "xt") call assert_equal([0, 1, 10, 2, 15], getcurpos()) + call test_setmouse(row, 21 + 20) + call feedkeys("\", "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 test_setmouse(row + 1, 12) + call feedkeys("\", "xt") + call assert_equal([0, 1, 24 + 9, 0, 24 + 12], getcurpos()) + call test_setmouse(row + 1, 13) + call feedkeys("\", "xt") + call assert_equal([0, 1, 24 + 10, 0, 24 + 13], getcurpos()) + call test_setmouse(row + 1, 15) + call feedkeys("\", "xt") + call assert_equal([0, 1, 24 + 10, 2, 24 + 15], getcurpos()) + call test_setmouse(row + 1, 20) + call feedkeys("\", "xt") + call assert_equal([0, 1, 24 + 10, 7, 24 + 20], getcurpos()) + bwipe! let &mouse = save_mouse set virtualedit& diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -700,6 +700,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1937, +/**/ 1936, /**/ 1935,