From: David Lawrence Ramsey Date: Fri, 30 Jan 2004 04:29:52 +0000 (+0000) Subject: and switch to cbreak mode in handle_sigwinch() too X-Git-Tag: v1.3.2~57 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=53809440f3e0be64e581bdc2da95b719d87d61b9;p=nano.git and switch to cbreak mode in handle_sigwinch() too git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1641 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- diff --git a/ChangeLog b/ChangeLog index 9b79a630..9fc8d16e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -31,8 +31,9 @@ CVS code - and turn off via termios in main(), as well as with the associated comment. (DLR) handle_sigwinch() - - Set keypad() to TRUE just before calling siglongjmp(), in case - we resized during verbatim input. (DLR) + - Set keypad() to TRUE and switch to cbreak mode just before + calling siglongjmp(), in case we resized during verbatim + input. (DLR) main() - Move the call to raw() on systems that don't define _POSIX_VDISABLE outside the main input/output loop, as it diff --git a/src/nano.c b/src/nano.c index e9eae62e..b5a5b132 100644 --- a/src/nano.c +++ b/src/nano.c @@ -240,8 +240,7 @@ void window_init(void) topwin = newwin(2, COLS, 0, 0); bottomwin = newwin(3 - no_help(), COLS, LINES - 3 + no_help(), 0); - /* Turn the keypad on, so that it still works after a Meta-X, for - * example. */ + /* Turn the keypad on, so that it still works after a Meta-X. */ keypad(edit, TRUE); keypad(bottomwin, TRUE); } @@ -2978,10 +2977,13 @@ void handle_sigwinch(int s) /* Turn cursor back on for sure. */ curs_set(1); - /* Turn the keypad on, so that it still works if we resized during - * verbatim input, for example. */ + /* Turn the keypad on and switch to cbreak mode, so that the keypad + * and input still work if we resized during verbatim input. */ keypad(edit, TRUE); keypad(bottomwin, TRUE); +#ifdef _POSIX_VDISABLE + cbreak(); +#endif /* Jump back to the main loop. */ siglongjmp(jmpbuf, 1);