From 5aee539071014acfa966e1a66e25031e378c8787 Mon Sep 17 00:00:00 2001 From: Chris Allegretta Date: Thu, 10 Jan 2002 12:47:30 +0000 Subject: [PATCH] - nano.c:do_suspend() - Call tcsetattr() to restore the old terminal settings, so tcsh can use ^C after suspend for example (fixes BUG #68) git-svn-id: svn://svn.savannah.gnu.org/nano/branches/nano_1_0_branch/nano@993 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- BUGS | 3 +++ ChangeLog | 8 ++++++++ nano.c | 3 +++ 3 files changed, 14 insertions(+) diff --git a/BUGS b/BUGS index 828875d5..e7479f96 100644 --- a/BUGS +++ b/BUGS @@ -130,6 +130,9 @@ - The spell checker prompts whether you want to replace occurences of a word even if you didn't alter it on the status bar (fixed by Rocco Corsi) (67) [FIXED]. +- ^C does not work after a suspend in tcsh (discovered by + Trevor Cordes) (68) [FIXED]. + ** Open BUGS ** diff --git a/ChangeLog b/ChangeLog index cbe537b4..b0c50943 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,12 @@ CVS Code - +- General + - Better partial word checking code. New function + search.c:is_whole_word(), changes to findnextstr(), + and nano.c:do_int_spell_fix() (Rocco Corsi). +- nano.c: + do_suspend() + - Call tcsetattr() to restore the old terminal settings, so + tcsh can use ^C after suspend for example (fixes BUG #68). - winio.c: edit_refresh() - Rename lines to nlines to fix AIX breakage (reported by diff --git a/nano.c b/nano.c index 34e3b66f..8715d76b 100644 --- a/nano.c +++ b/nano.c @@ -1684,6 +1684,9 @@ RETSIGTYPE do_suspend(int signal) printf("\n\n\n\n\nUse \"fg\" to return to nano\n"); fflush(stdout); + /* Restore the terminal settings for the disabled keys */ + tcsetattr(0, TCSANOW, &oldterm); + /* We used to re-enable the default SIG_DFL and raise SIGTSTP, but then we could be (and were) interrupted in the middle of the call. So we do it the mutt way instead */ -- 2.39.5