patch 9.1.0892: the max value of 'tabheight' is limited by other tabpages

Problem:  the max value of 'tabheight' is limited by other tabpages
Solution: Limit the maximum value of 'cmdheight' to the current tabpage only.
          (Milly)

The Help says that cmdheight is local to the tab page, but says nothing
about the maximum value depending on the state of all tab pages. Users
may wonder why they can't increase cmdheight when there are still rows
available on the current tab page. This PR changes the behavior of
cmdheight so that its maximum value depends only on the state of the
current tab page.

Also, since magic numbers were embedded in various places with the
minimum value of cmdheight being 1, we defined a constant to make it
easier to understand.

closes: #16131

Signed-off-by: Milly <milly.ca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Milly
2024-11-28 18:16:55 +01:00
committed by Christian Brabandt
parent 511eb84c08
commit 2cddf0e85a
8 changed files with 66 additions and 14 deletions

View File

@ -3564,8 +3564,9 @@ get_bytes_from_buf(char_u *buf, char_u *bytes, int num_bytes)
void
check_shellsize(void)
{
if (Rows < min_rows()) // need room for one window and command line
Rows = min_rows();
// need room for one window and command line
if (Rows < min_rows_for_all_tabpages())
Rows = min_rows_for_all_tabpages();
limit_screen_size();
// make sure these values are not invalid