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>
diff --git a/src/vim.h b/src/vim.h
index 2878541..f8090bf 100644
--- a/src/vim.h
+++ b/src/vim.h
@@ -1625,6 +1625,7 @@
*/
#define MIN_COLUMNS 12 // minimal columns for screen
#define MIN_LINES 2 // minimal lines for screen
+#define MIN_CMDHEIGHT 1 // minimal height for command line
#define STATUS_HEIGHT 1 // height of a status line under a window
#ifdef FEAT_MENU // height of a status line under a window
# define WINBAR_HEIGHT(wp) (wp)->w_winbar_height