]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.2.0445: win_fix_scroll() called before win_comp_pos() in command_height() v9.2.0445
authorJesse Rosenstock <jmr@google.com>
Tue, 5 May 2026 19:50:46 +0000 (19:50 +0000)
committerChristian Brabandt <cb@256bit.org>
Tue, 5 May 2026 19:50:46 +0000 (19:50 +0000)
Problem:  win_fix_scroll(true) is called before win_comp_pos() in
          command_height().
Solution: Move win_fix_scroll(true) after win_comp_pos(), matching the
          ordering used in win_drag_status_line() (Jesse Rosenstock).

Patch 9.2.0413 added win_fix_scroll(true) to command_height() to handle
splitkeep when cmdheight changes, but placed the call before win_comp_pos().
win_fix_scroll() reads w_winrow to detect window movement
(https://github.com/vim/vim/blob/620557bd48865fa3d927901764d2747bf68597b5/src/window.c#L7266),
but w_winrow is not recomputed until win_comp_pos() runs
(https://github.com/vim/vim/blob/620557bd48865fa3d927901764d2747bf68597b5/src/window.c#L6516).
This causes incorrect scroll adjustments and was breaking
Test_smoothscroll_incsearch on macOS CI.

closes: #20138

Co-authored-by: Gemini
Signed-off-by: Jesse Rosenstock <jmr@google.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/version.c
src/window.c

index a859c2ceda3bee578425fa71b4b19b6ad04c6da9..4d3f68d05ccaf07363bf6c96495048f454dfbace 100644 (file)
@@ -729,6 +729,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    445,
 /**/
     444,
 /**/
index 8813ffa808ee7ed1f145202aa58dba094409cef5..eb4e494d19b11d9e251f8ae78164a43f8bb2588d 100644 (file)
@@ -7591,10 +7591,10 @@ command_height(void)
     }
     if (p_ch < old_p_ch && command_frame_height && frp != NULL)
        frame_add_height(frp, (int)(old_p_ch - p_ch));
-    win_fix_scroll(true);
 
     // Recompute window positions.
     win_comp_pos();
+    win_fix_scroll(true);
     cmdline_row = Rows - p_ch;
     redraw_cmdline = TRUE;