diff options
author | Shougo <Shougo.Matsu@gmail.com> | 2022-07-31 14:13:19 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-31 13:13:19 +0800 |
commit | c1652bdcb5b5ca95b5ae328cec582f23816b70dd (patch) | |
tree | f0a0ac777f12b7d44ea2b13daecc413d08176e86 /src/nvim/window.c | |
parent | 7f4c50f8c48a57067147ff49bee84d8f4594159d (diff) | |
download | rneovim-c1652bdcb5b5ca95b5ae328cec582f23816b70dd.tar.gz rneovim-c1652bdcb5b5ca95b5ae328cec582f23816b70dd.tar.bz2 rneovim-c1652bdcb5b5ca95b5ae328cec582f23816b70dd.zip |
cmdheight=0: fix bugs part2 (#19185)
Diffstat (limited to 'src/nvim/window.c')
-rw-r--r-- | src/nvim/window.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/nvim/window.c b/src/nvim/window.c index b2812189d9..0bd84c0269 100644 --- a/src/nvim/window.c +++ b/src/nvim/window.c @@ -5877,7 +5877,7 @@ void win_setminheight(void) // loop until there is a 'winminheight' that is possible while (p_wmh > 0) { const int room = Rows - (int)p_ch; - const int needed = min_rows() - 1; // 1 was added for the cmdline + const int needed = min_rows(); if (room >= needed) { break; } @@ -6830,7 +6830,9 @@ int min_rows(void) } } total += tabline_height() + global_stl_height(); - total += 1; // count the room for the command line + if (p_ch > 0) { + total += 1; // count the room for the command line + } return total; } |