commit 931bf96c1d0cf7a6e19555d0e1ea4ecf9591a4fa
parent 956a1c23273e1f16f19a6794b390e1645eb9600b
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Wed, 17 Nov 2021 17:09:29 +0100
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.)
Diffstat:
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/nano.c b/src/nano.c
@@ -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))
diff --git a/src/winio.c b/src/winio.c
@@ -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. */