From c09e96f294033a0de6bd345ca974098870eda817 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Mon, 27 Jan 2020 16:39:34 +0100 Subject: [PATCH] suspension: put in an extra terminal-initialization call for Slang Also, the disabling of the keyboard interrupt (SIGINT) must happen after that initialization call, otherwise ^C will still do nothing after returning from suspension (when nano is built against Slang). This fixes https://savannah.gnu.org/bugs/?57656. Bug existed since version 2.2.0, commit daaf468c. --- src/nano.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/nano.c b/src/nano.c index 25695a58..7a415e2e 100644 --- a/src/nano.c +++ b/src/nano.c @@ -1289,7 +1289,6 @@ void terminal_init(void) nonl(); noecho(); disable_extended_io(); - disable_kb_interrupt(); if (ISSET(PRESERVE)) enable_flow_control(); @@ -1301,7 +1300,11 @@ void terminal_init(void) have_new_state = TRUE; } else tcsetattr(0, TCSANOW, &desired_state); + + SLang_init_tty(-1, 0, 0); #endif + disable_kb_interrupt(); + #ifndef NANO_TINY /* Tell the terminal to enable bracketed pastes. */ printf("\e[?2004h");