aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/window.c
diff options
context:
space:
mode:
authorShougo Matsushita <Shougo.Matsu@gmail.com>2022-08-16 14:58:41 +0900
committerzeertzjq <zeertzjq@outlook.com>2022-08-17 09:35:07 +0800
commit9a6d3bd76e1edcedf71f31dfa5e1600c1c5d2c3a (patch)
treea503a2989c51957a6e6e53eda62430784572b6b7 /src/nvim/window.c
parent5977a96b3fa8283862d5768daebdbdaae84a8b3d (diff)
downloadrneovim-9a6d3bd76e1edcedf71f31dfa5e1600c1c5d2c3a.tar.gz
rneovim-9a6d3bd76e1edcedf71f31dfa5e1600c1c5d2c3a.tar.bz2
rneovim-9a6d3bd76e1edcedf71f31dfa5e1600c1c5d2c3a.zip
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. https://github.com/vim/vim/commit/d4cf9fc53e0b1d36e84d28ecd5595a6f102f325e 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) https://github.com/vim/vim/commit/fdc5d17d58cc9c9edc9fb2816e1afaabc531bf1e
Diffstat (limited to 'src/nvim/window.c')
-rw-r--r--src/nvim/window.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/nvim/window.c b/src/nvim/window.c
index f567ccc556..b17245dd3d 100644
--- a/src/nvim/window.c
+++ b/src/nvim/window.c
@@ -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) {