From 3f0d2fd5cacc4102f74a71e367c750f2ac406dcf Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Tue, 7 Jan 2020 13:31:08 +0100 Subject: [PATCH] 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. --- src/nano.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/nano.c b/src/nano.c index 34eafe29..3f19d0c2 100644 --- 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);