nano

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

commit 0afe38d81ae1f8c6d10b4fcfe0fdba6292295fb6
parent 3dfd798d51cb1321b962d618123cc54c65b16097
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Wed, 17 Nov 2021 12:21:41 +0100

help: skip the leading blank line when the terminal is very flat

On very flat terminals, a leading blank line could lead to ^G showing
just a blank row instead of the first line of the help text.

Diffstat:
Msrc/help.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/help.c b/src/help.c @@ -325,7 +325,7 @@ void wrap_help_text_into_buffer(void) make_new_buffer(); /* Ensure there is a blank line at the top of the text, for esthetics. */ - if (ISSET(MINIBAR) || !ISSET(EMPTY_LINE)) { + if ((ISSET(MINIBAR) || !ISSET(EMPTY_LINE)) && LINES > 6) { openfile->current->data = mallocstrcpy(openfile->current->data, " "); openfile->current->next = make_new_node(openfile->current); openfile->current = openfile->current->next;