vim-patch:9.0.0191: messages test fails; window size incorrect

Problem:    Messages test fails; window size incorrect when 'cmdheight' is
            made smaller.
Solution:   Properly cleanup after test with cmdheight zero.  Resize windows
            correctly when 'cmdheight' gets smaller.
d4cf9fc53e

N/A patches for version.c:

vim-patch:9.0.0192: possible invalid memory access when 'cmdheight' is zero

Problem:    Possible invalid memory access when 'cmdheight' is zero. (Martin
            Tournoij)
Solution:   Avoid going over the end of w_lines[] when w_height is Rows.
            (closes vim/vim#10882)
fdc5d17d58
This commit is contained in:
Shougo Matsushita
2022-08-16 14:58:41 +09:00
committed by zeertzjq
parent 5977a96b3f
commit 9a6d3bd76e
3 changed files with 17 additions and 1 deletions

View File

@@ -6399,6 +6399,13 @@ void command_height(void)
return;
}
// If cmdline_row is smaller than what it is supposed to be for 'cmdheight'
// then set old_p_ch to what it would be, so that the windows get resized
// properly for the new value.
if (cmdline_row < Rows - p_ch) {
old_p_ch = Rows - cmdline_row;
}
// Find bottom frame with width of screen.
frp = lastwin_nofloating()->w_frame;
while (frp->fr_width != Columns && frp->fr_parent != NULL) {