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.
master
Benno Schulenberg 2020-01-27 16:39:34 +01:00
parent 0b54785fe5
commit c09e96f294
1 changed files with 4 additions and 1 deletions

View File

@ -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");