display: make sure there are at least as many text lines as help lines

It's an editor -- the largest element should be the text to be edited,
not some part of the interface.

(It would be better if the edit window was always the largest element,
larger than or equal to all interface elements combined.  But that is
something for another time.)
master
Benno Schulenberg 2021-11-17 17:09:29 +01:00
parent 956a1c2327
commit 931bf96c1d
2 changed files with 3 additions and 3 deletions

View File

@ -420,8 +420,8 @@ void window_init(void)
edit = newwin(editwinrows, COLS, 0, 0);
bottomwin = newwin(1, COLS, LINES - 1, 0);
} else {
int toprows = ((ISSET(EMPTY_LINE) && LINES > 5) ? 2 : 1);
int bottomrows = ((ISSET(NO_HELP) || LINES < 5) ? 1 : 3);
int toprows = ((ISSET(EMPTY_LINE) && LINES > 6) ? 2 : 1);
int bottomrows = ((ISSET(NO_HELP) || LINES < 6) ? 1 : 3);
#ifndef NANO_TINY
if (ISSET(MINIBAR) || ISSET(ZERO))

View File

@ -2391,7 +2391,7 @@ void bottombars(int menu)
/* Set the global variable to the given menu. */
currmenu = menu;
if (ISSET(NO_HELP) || LINES < 5)
if (ISSET(NO_HELP) || LINES < 6)
return;
/* Determine how many shortcuts must be shown. */