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
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);
}
/* 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);