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>
" 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')
call assert_equal(topline, line('w0'))
%bwipeout!
+ only!
set splitkeep&
endfunc
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 895,
/**/
894,
/**/