patch 9.2.0605: tests: Test_screenpos() is flaky in GUI

Commit: 
https://github.com/vim/vim/commit/781a91ac54fc7e647a0d2d85df9a4b884fb28ee8
Author: thinca <[email protected]>
Date:   Tue Jun 9 18:39:52 2026 +0000

    patch 9.2.0605: tests: Test_screenpos() is flaky in GUI
    
    Problem:  Test_screenpos() fails intermittently in the GUI testgui CI
              job with "Expected {'row': 22} but got {'row': 23}".  In the
              GUI, the window height reported by getwininfo() before the
              final redraw can be stale, so the cached wininfo.height does
              not match the actual window height when the assertion runs.
    Solution: Use winheight(winid) at assertion time so the height reflects
              the window state after the redraw.
    
    closes: #20457
    
    Signed-off-by: thinca <[email protected]>
    Signed-off-by: Christian Brabandt <[email protected]>

diff --git a/src/testdir/test_cursor_func.vim b/src/testdir/test_cursor_func.vim
index e541da886..9aaeb5d47 100644
--- a/src/testdir/test_cursor_func.vim
+++ b/src/testdir/test_cursor_func.vim
@@ -125,7 +125,7 @@ func Test_screenpos()
   exe "normal G\<C-Y>\<C-Y>"
   redraw
   let winbar_height = get(wininfo, 'winbar', 0)
-  call assert_equal({'row': winrow + wininfo.height - 1 + winbar_height,
+  call assert_equal({'row': winrow + winheight(winid) - 1 + winbar_height,
        \ 'col': wincol + 7,
        \ 'curscol': wincol + 7,
        \ 'endcol': wincol + 7}, winid->screenpos(line('$'), 8))
diff --git a/src/version.c b/src/version.c
index b5cae5ec4..68013a0ea 100644
--- a/src/version.c
+++ b/src/version.c
@@ -729,6 +729,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    605,
 /**/
     604,
 /**/

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/vim_dev/E1wX1Rh-006e7z-55%40256bit.org.

Raspunde prin e-mail lui