]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.2.0895: test: Test_aucmd_win_scroll_multibyte() is flaky in the GUI v9.2.0895
authorHirohito Higashi <h.east.727@gmail.com>
Sun, 2 Aug 2026 17:13:43 +0000 (17:13 +0000)
committerChristian Brabandt <cb@256bit.org>
Sun, 2 Aug 2026 17:13:43 +0000 (17:13 +0000)
Problem:  The test comparing the top line before and after using the
          autocommand window is flaky in the GUI.
Solution: Run the test in a window with a fixed size.  In the GUI a
          pending resize of the shell is applied at the end of a screen
          update, thus the size may change between the two measurements.

related: #20884
closes:  #20913

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/testdir/test_window_cmd.vim
src/version.c

index 701eec65c40925c2371e1fa52727afb0bbebe072..f3aa38dc4a3169bf705b5b84003e529bd1763d8f 100644 (file)
@@ -2038,8 +2038,11 @@ func Test_aucmd_win_scroll_multibyte()
   " Using the autocommand window must not scroll the current window when the
   " cursor is behind multi-byte characters.
   set splitkeep=cursor
-  call setline(1, repeat([repeat(nr2char(0x3042), 200)], 20))
-  normal! G0100l
+  " Use a window with a fixed size, the size of the screen may change while
+  " the test is running.
+  call NewWindow(11, 40)
+  call setline(1, repeat([repeat(nr2char(0x3042), 100)], 20))
+  normal! G050l
   redraw
   let topline = line('w0')
 
@@ -2049,6 +2052,7 @@ func Test_aucmd_win_scroll_multibyte()
   call assert_equal(topline, line('w0'))
 
   %bwipeout!
+  only!
   set splitkeep&
 endfunc
 
index d1497635b935c185359947945da6e7eb59d2668d..d1b8ad9311406ae3e98738469a6261b742b8f99c 100644 (file)
@@ -758,6 +758,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    895,
 /**/
     894,
 /**/