commit eaeafe29cad72fc58d8929f99e48599599a68af7
parent fe3a72ce3ea66a568acfdc31ede3b136a20612c9
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Wed, 12 Sep 2018 16:04:11 +0200
suspension: don't try to show the cursor position when going to sleep
As the statusbar() function will write the position directly to the
terminal when not in curses mode, the final part of this position
message will seem to be after the prompt when exiting from nano.
The cursor position will get written correctly to the status bar
anyway, because returning from suspension enters a fake key into
the keyboard buffer, and this key elicits an update of the display.
This fixes https://savannah.gnu.org/bugs/?54639.
Reported-by: Lauri Kasanen <cand@gmx.com>
Bug existed since version 2.4.2, commit 75d64e67.
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/nano.c b/src/nano.c
@@ -1263,6 +1263,9 @@ RETSIGTYPE do_suspend(int signal)
/* Restore the old terminal settings. */
tcsetattr(0, TCSANOW, &oldterm);
+ /* The suspend keystroke must not elicit cursor-position display. */
+ suppress_cursorpos=TRUE;
+
#ifdef SIGSTOP
/* Do what mutt does: send ourselves a SIGSTOP. */
kill(0, SIGSTOP);