patch 9.2.0895: test: Test_aucmd_win_scroll_multibyte() is flaky in the GUI
Commit:
https://github.com/vim/vim/commit/85b8034dff60c3631c0cd6fb9c9104610d064659
Author: Hirohito Higashi <
h.eas...@gmail.com>
Date: Sun Aug 2 17:13:43 2026 +0000
patch 9.2.0895: test: Test_aucmd_win_scroll_multibyte() is flaky in the GUI
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) <
nor...@anthropic.com>
Signed-off-by: Hirohito Higashi <
h.eas...@gmail.com>
Signed-off-by: Christian Brabandt <
c...@256bit.org>
diff --git a/src/testdir/test_window_cmd.vim b/src/testdir/test_window_cmd.vim
index 701eec65c..f3aa38dc4 100644
--- a/src/testdir/test_window_cmd.vim
+++ b/src/testdir/test_window_cmd.vim
@@ -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
diff --git a/src/version.c b/src/version.c
index d1497635b..d1b8ad931 100644
--- a/src/version.c
+++ b/src/version.c
@@ -758,6 +758,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 895,
/**/
894,
/**/