diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-10-05 15:42:32 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-10-05 15:42:32 +0100 |
commit | 0816f473ab2f6cf7d8311c0f97371cada7f20d18 (patch) | |
tree | 46c3a0fe1d1a91ac6ca535b297ccc72e2d378354 /src/window.c | |
parent | f3ef026c9897f1d2e3fba47166a4771d507dae91 (diff) |
patch 9.0.0665: setting 'cmdheight' has no effect if last window was resizedv9.0.0665
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 #11286)
Diffstat (limited to 'src/window.c')
-rw-r--r-- | src/window.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/window.c b/src/window.c index 52c458e033..79ff5a4269 100644 --- a/src/window.c +++ b/src/window.c @@ -6644,7 +6644,7 @@ 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) @@ -6663,6 +6663,9 @@ command_height(void) if (p_ch > old_p_ch && cmdline_row <= Rows - p_ch) return; + // 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. |