diff --git a/src/nano.c b/src/nano.c
index ad6322ed88cd5f7b2686a56789d67ed0d54b2a38..981912c6d64f10230f1713f31ce8047499ef7b4b 100644
--- a/src/nano.c
+++ b/src/nano.c
@@ -2939,15 +2939,18 @@ void handle_sigwinch(int s)
     /* Turn cursor back on for sure. */
     curs_set(1);
 
+    /* Put the terminal in cbreak mode (read one character at a time and
+     * interpret the special control keys) if we can selectively disable
+     * the special control keys. */
+#ifdef _POSIX_VDISABLE
+    cbreak();
+#endif
+
     /* Set up the signal handlers again, so that the special control
      * keys all work the same as before. */
     signal_init();
 
-    /* Switch to cbreak mode and turn the keypad on, so that the keypad
-     * and input still work if we resized during verbatim input. */
-#ifdef _POSIX_VDISABLE
-    cbreak();
-#endif
+    /* Turn the keypad on in the windows we'll be reading input from. */
     keypad(edit, TRUE);
     keypad(bottomwin, TRUE);
 
diff --git a/src/winio.c b/src/winio.c
index 452043002f22ead22d641d14f7011fd8663ad700..e92a4268049bf7b4867dd3576bc947f43eb57e71 100644
--- a/src/winio.c
+++ b/src/winio.c
@@ -74,10 +74,11 @@ int *get_verbatim_kbinput(WINDOW *win, int *kbinput_len, int
     allow_pending_sigwinch(TRUE);
 #endif
 
-    /* Switch to raw mode so that we can type ^C, ^Q, ^S, ^Z, and ^\
-     * (and ^Y on systems supporting delayed suspend) without getting
-     * interrupts, and turn the keypad off so that we don't get extended
-     * keypad values, all of which are outside the ASCII range. */
+    /* Switch to raw mode if necessary so that we can type ^C, ^Q, ^S,
+     * ^Z, and ^\ (and ^Y on systems supporting delayed suspend) without
+     * getting interrupts, and turn the keypad off so that we don't get
+     * extended keypad values, all of which are outside the ASCII
+     * range. */
 #ifdef _POSIX_VDISABLE
     raw();
 #endif
@@ -103,8 +104,8 @@ int *get_verbatim_kbinput(WINDOW *win, int *kbinput_len, int
 	nodelay(win, FALSE);
     }
 
-    /* Switch back to cbreak mode and turn the keypad back on now that
-     * we're done. */
+    /* Switch back to cbreak mode if necessary and turn the keypad back
+     * on now that we're done. */
 #ifdef _POSIX_VDISABLE
     cbreak();
 #endif