From b741b1c985cca9a295562456b6d7ecabb8772d9a Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Tue, 11 May 2021 19:28:11 +0200 Subject: [PATCH] startup: skip drawing edit window when having message on one-row terminal When there is just one row and there is a message, it is not a good idea to draw the contents of the buffer as it would overwrite the message. This fixes https://savannah.gnu.org/bugs/?60582. Bug existed since version 2.7.0, since nano allows very flat terminals, and was made worse by commit 2cf28f9d from yesterday. --- src/nano.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nano.c b/src/nano.c index 697e4d14..232ad92a 100644 --- a/src/nano.c +++ b/src/nano.c @@ -2517,7 +2517,7 @@ int main(int argc, char **argv) if (!refresh_needed) { place_the_cursor(); wnoutrefresh(edit); - } else + } else if (LINES > 1 || lastmessage == VACUUM) edit_refresh(); #ifndef NANO_TINY