diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-05-08 20:38:06 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-05-08 20:38:06 +0100 |
commit | 8e8dc9b32326c6fbd37671b6072296404b481d4a (patch) | |
tree | f6890ee591cf195a09ec829e1f0db2e8b3427539 /src/testdir/test_edit.vim | |
parent | a91cb98bb36b0f9dc3c378c0bbd9a69de29830fa (diff) |
patch 8.2.4916: mouse in Insert mode test failsv8.2.4916
Problem: Mouse in Insert mode test fails.
Solution: Fix the text and check relevant positions.
Diffstat (limited to 'src/testdir/test_edit.vim')
-rw-r--r-- | src/testdir/test_edit.vim | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/src/testdir/test_edit.vim b/src/testdir/test_edit.vim index dddffa3891..8c4d9f2223 100644 --- a/src/testdir/test_edit.vim +++ b/src/testdir/test_edit.vim @@ -1213,20 +1213,28 @@ func Test_edit_MOUSE() 10new call setline(1, range(1, 100)) call cursor(1, 1) + call assert_equal(1, line('w0')) + call assert_equal(10, line('w$')) set mouse=a + " One scroll event moves three lines. call feedkeys("A\<ScrollWheelDown>\<esc>", 'tnix') - call assert_equal([0, 4, 1, 0], getpos('.')) - " This should move by one pageDown, but only moves - " by one line when the test is run... + call assert_equal(4, line('w0')) + call assert_equal(13, line('w$')) + " This should move by one page down. call feedkeys("A\<S-ScrollWheelDown>\<esc>", 'tnix') - call assert_equal([0, 5, 1, 0], getpos('.')) + call assert_equal(14, line('w0')) set nostartofline + " Another page down. call feedkeys("A\<C-ScrollWheelDown>\<esc>", 'tnix') - call assert_equal([0, 6, 1, 0], getpos('.')) + call assert_equal(24, line('w0')) + + call assert_equal([0, 24, 2, 0], getpos('.')) + call test_setmouse(4, 3) call feedkeys("A\<LeftMouse>\<esc>", 'tnix') - call assert_equal([0, 6, 1, 0], getpos('.')) - call feedkeys("A\<RightMouse>\<esc>", 'tnix') - call assert_equal([0, 6, 1, 0], getpos('.')) + call assert_equal([0, 27, 2, 0], getpos('.')) + call test_setmouse(5, 3) + call feedkeys("A\<RightMouse>\<esc>\<esc>", 'tnix') + call assert_equal([0, 28, 2, 0], getpos('.')) call cursor(1, 100) norm! zt " this should move by a screen up, but when the test |