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.
This commit is contained in:
Benno Schulenberg 2021-05-11 19:28:11 +02:00
parent 5f87ed5644
commit b741b1c985

View File

@ -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