aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/window.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-10-06 09:03:49 +0800
committerGitHub <noreply@github.com>2022-10-06 09:03:49 +0800
commitbc64aa435b84bb3a43501e101c51507c75fbd349 (patch)
treebb75d9fed367173cd77bcbf6ccc8206a9c476f95 /src/nvim/window.c
parent6ae4a6e0711035a8a0801dd6fdb545e020bccd70 (diff)
downloadrneovim-bc64aa435b84bb3a43501e101c51507c75fbd349.tar.gz
rneovim-bc64aa435b84bb3a43501e101c51507c75fbd349.tar.bz2
rneovim-bc64aa435b84bb3a43501e101c51507c75fbd349.zip
vim-patch:9.0.0665: setting 'cmdheight' has no effect if last window was resized (#20500)
Problem: Setting 'cmdheight' has no effect if last window was resized. Solution: Do apply 'cmdheight' when told to. Use the frame height instead of the cmdline_row. (closes vim/vim#11286) https://github.com/vim/vim/commit/0816f473ab2f6cf7d8311c0f97371cada7f20d18
Diffstat (limited to 'src/nvim/window.c')
-rw-r--r--src/nvim/window.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/nvim/window.c b/src/nvim/window.c
index c0edef7abc..242ff1fb12 100644
--- a/src/nvim/window.c
+++ b/src/nvim/window.c
@@ -6263,7 +6263,7 @@ void win_comp_scroll(win_T *wp)
}
}
-// command_height: called whenever p_ch has been changed
+/// command_height: called whenever p_ch has been changed.
void command_height(void)
{
int h;
@@ -6275,6 +6275,9 @@ void command_height(void)
// p_ch was changed in another tab page.
curtab->tp_ch_used = p_ch;
+ // Update cmdline_row to what it should be: just below the last window.
+ cmdline_row = topframe->fr_height;
+
// 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.