commit 53809440f3e0be64e581bdc2da95b719d87d61b9
parent 273d2ce2d58640bf60ac812a720995665d4b1459
Author: David Lawrence Ramsey <pooka109@gmail.com>
Date: Fri, 30 Jan 2004 04:29:52 +0000
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
Diffstat:
2 files changed, 9 insertions(+), 6 deletions(-)
diff --git 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
@@ -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);