From d191070913dc195309926a91f97008defd877a71 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 7 Oct 2022 08:52:51 +0800 Subject: fix(ui): setting 'cmdheight' with global statusline (#20515) --- src/nvim/option.c | 2 +- src/nvim/window.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/nvim/option.c b/src/nvim/option.c index c6a9d6b7db..208112561a 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -2469,7 +2469,7 @@ static char *set_num_option(int opt_idx, char_u *varp, long value, char *errbuf, // Only compute the new window layout when startup has been // completed. Otherwise the frame sizes may be wrong. if ((p_ch != old_value - || tabline_height() + topframe->fr_height != Rows - p_ch) + || tabline_height() + global_stl_height() + topframe->fr_height != Rows - p_ch) && full_screen) { command_height(); } diff --git a/src/nvim/window.c b/src/nvim/window.c index 5993df64cd..b505350892 100644 --- a/src/nvim/window.c +++ b/src/nvim/window.c @@ -6409,7 +6409,7 @@ void command_height(void) curtab->tp_ch_used = p_ch; // Update cmdline_row to what it should be: just below the last window. - cmdline_row = topframe->fr_height + tabline_height(); + cmdline_row = topframe->fr_height + tabline_height() + global_stl_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 -- cgit