commit 3f0d2fd5cacc4102f74a71e367c750f2ac406dcf
parent 5b07e5fd1f2edc04755942fa4f87fb4d1b6a0345
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Tue, 7 Jan 2020 13:31:08 +0100
display: don't let a message write over the second help line
When suspending nano on a Linux console (or FreeBSD console), the
helpful message about using the 'fg' command overwrote the start
of the second help line, kind of hiding the message. So, output
a double newline before the message to make it stand out.
Also, drop a pointless cursor movement, as endwin() determines
the placement of the cursor all by itself.
Diffstat:
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/nano.c b/src/nano.c
@@ -1210,12 +1210,11 @@ RETSIGTYPE do_suspend(int signal)
#ifdef ENABLE_MOUSE
disable_mouse_support();
#endif
-
- /* Move the cursor to the last line of the screen. */
- move(LINES - 1, 0);
curs_set(1);
endwin();
+ printf("\n\n");
+
/* Display our helpful message. */
printf(_("Use \"fg\" to return to nano.\n"));
fflush(stdout);