From 462e9d4822a36a30d824efad99a3226c4dbc45d4 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Tue, 8 Sep 2020 09:15:12 +0200 Subject: [PATCH] suspension: switch off flow control at the right moment (for Slang) This fixes https://savannah.gnu.org/bugs/?59078. Bug existed since version 4.8, commit c09e96f2. --- src/nano.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/nano.c b/src/nano.c index 18847f10..8064efd6 100644 --- a/src/nano.c +++ b/src/nano.c @@ -1194,19 +1194,19 @@ void terminal_init(void) nonl(); noecho(); disable_extended_io(); - - if (ISSET(PRESERVE)) - enable_flow_control(); #ifdef USE_SLANG - else - disable_flow_control(); - tcgetattr(0, &desired_state); have_new_state = TRUE; } else tcsetattr(0, TCSANOW, &desired_state); SLang_init_tty(-1, 0, 0); +#endif + if (ISSET(PRESERVE)) + enable_flow_control(); +#ifdef USE_SLANG + else + disable_flow_control(); #endif disable_kb_interrupt();