From 0afe38d81ae1f8c6d10b4fcfe0fdba6292295fb6 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Wed, 17 Nov 2021 12:21:41 +0100 Subject: [PATCH] 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. --- src/help.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/help.c b/src/help.c index 387bcb40..0c39e4c1 100644 --- 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;