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
master
David Lawrence Ramsey 2004-01-30 04:29:52 +00:00
parent 273d2ce2d5
commit 53809440f3
2 changed files with 9 additions and 6 deletions

View File

@ -31,8 +31,9 @@ CVS code -
and turn off via termios in main(), as well as with the and turn off via termios in main(), as well as with the
associated comment. (DLR) associated comment. (DLR)
handle_sigwinch() handle_sigwinch()
- Set keypad() to TRUE just before calling siglongjmp(), in case - Set keypad() to TRUE and switch to cbreak mode just before
we resized during verbatim input. (DLR) calling siglongjmp(), in case we resized during verbatim
input. (DLR)
main() main()
- Move the call to raw() on systems that don't define - Move the call to raw() on systems that don't define
_POSIX_VDISABLE outside the main input/output loop, as it _POSIX_VDISABLE outside the main input/output loop, as it

View File

@ -240,8 +240,7 @@ void window_init(void)
topwin = newwin(2, COLS, 0, 0); topwin = newwin(2, COLS, 0, 0);
bottomwin = newwin(3 - no_help(), COLS, LINES - 3 + no_help(), 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 /* Turn the keypad on, so that it still works after a Meta-X. */
* example. */
keypad(edit, TRUE); keypad(edit, TRUE);
keypad(bottomwin, TRUE); keypad(bottomwin, TRUE);
} }
@ -2978,10 +2977,13 @@ void handle_sigwinch(int s)
/* Turn cursor back on for sure. */ /* Turn cursor back on for sure. */
curs_set(1); curs_set(1);
/* Turn the keypad on, so that it still works if we resized during /* Turn the keypad on and switch to cbreak mode, so that the keypad
* verbatim input, for example. */ * and input still work if we resized during verbatim input. */
keypad(edit, TRUE); keypad(edit, TRUE);
keypad(bottomwin, TRUE); keypad(bottomwin, TRUE);
#ifdef _POSIX_VDISABLE
cbreak();
#endif
/* Jump back to the main loop. */ /* Jump back to the main loop. */
siglongjmp(jmpbuf, 1); siglongjmp(jmpbuf, 1);