To: vim_dev@googlegroups.com Subject: Patch 8.2.4916 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.4916 (after 8.2.4915) Problem: Mouse in Insert mode test fails. Solution: Fix the text and check relevant positions. Files: src/testdir/test_edit.vim *** ../vim-8.2.4915/src/testdir/test_edit.vim 2022-05-05 20:46:41.407274630 +0100 --- src/testdir/test_edit.vim 2022-05-08 20:36:38.688590181 +0100 *************** *** 1213,1232 **** 10new call setline(1, range(1, 100)) call cursor(1, 1) set mouse=a call feedkeys("A\\", '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 feedkeys("A\\", 'tnix') ! call assert_equal([0, 5, 1, 0], getpos('.')) set nostartofline call feedkeys("A\\", 'tnix') ! call assert_equal([0, 6, 1, 0], getpos('.')) call feedkeys("A\\", 'tnix') ! call assert_equal([0, 6, 1, 0], getpos('.')) ! call feedkeys("A\\", 'tnix') ! call assert_equal([0, 6, 1, 0], getpos('.')) call cursor(1, 100) norm! zt " this should move by a screen up, but when the test --- 1213,1240 ---- 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\\", 'tnix') ! call assert_equal(4, line('w0')) ! call assert_equal(13, line('w$')) ! " This should move by one page down. call feedkeys("A\\", 'tnix') ! call assert_equal(14, line('w0')) set nostartofline + " Another page down. call feedkeys("A\\", 'tnix') ! call assert_equal(24, line('w0')) ! ! call assert_equal([0, 24, 2, 0], getpos('.')) ! call test_setmouse(4, 3) call feedkeys("A\\", 'tnix') ! call assert_equal([0, 27, 2, 0], getpos('.')) ! call test_setmouse(5, 3) ! call feedkeys("A\\\", '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 *** ../vim-8.2.4915/src/version.c 2022-05-08 19:39:27.658318960 +0100 --- src/version.c 2022-05-08 20:37:41.200560728 +0100 *************** *** 748,749 **** --- 748,751 ---- { /* Add new patch number below this line */ + /**/ + 4916, /**/ -- Amazing but true: If all the salmon caught in Canada in one year were laid end to end across the Sahara Desert, the smell would be absolutely awful. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///