nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 16dff06a4c88ca8bd9273f59c63fed89f6bb8242
parent c3900e90f0d9f2f0855af4de0e6bfeb75616cb02
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Fri,  4 Dec 2020 16:27:34 +0100

tweaks: simplify a bit of logic

Diffstat:
Msrc/nano.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/nano.c b/src/nano.c @@ -408,8 +408,8 @@ void window_init(void) edit = newwin(1, COLS, 0, 0); bottomwin = newwin(1, COLS, LINES - 1, 0); } else { - int toprows = (!ISSET(EMPTY_LINE) ? 1 : (LINES < 6) ? 1 : 2); - int bottomrows = (ISSET(NO_HELP) ? 1 : (LINES < 5) ? 1 : 3); + int toprows = ((ISSET(EMPTY_LINE) && LINES > 5) ? 2 : 1); + int bottomrows = ((ISSET(NO_HELP) || LINES < 5) ? 1 : 3); editwinrows = LINES - toprows - bottomrows;