diff -ur nano/src/winio.c nano-fixed/src/winio.c
--- nano/src/winio.c	2016-09-12 23:05:12.337926053 -0500
+++ nano-fixed/src/winio.c	2016-09-13 10:36:54.299418241 -0500
@@ -95,8 +95,8 @@
  *
  * We support escape sequences for ANSI, VT100, VT220, VT320, the Linux
  * console, the FreeBSD console, the Mach console, xterm, rxvt, Eterm,
- * and Terminal, and some for iTerm2.  Among these, there are several
- * conflicts and omissions, outlined as follows:
+ * and Xfce4-terminal, and some for iTerm2.  Among these, there are
+ * several conflicts and omissions, outlined as follows:
  *
  * - Tab on ANSI == PageUp on FreeBSD console; the former is omitted.
  *   (Ctrl-I is also Tab on ANSI, which we already support.)
@@ -703,31 +703,39 @@
 	switch (seq[3]) {
 	    case '2':
 		switch (seq[4]) {
-		    case 'A': /* Esc O 1 ; 2 A == Shift-Up on Terminal. */
-		    case 'B': /* Esc O 1 ; 2 B == Shift-Down on Terminal. */
-		    case 'C': /* Esc O 1 ; 2 C == Shift-Right on Terminal. */
-		    case 'D': /* Esc O 1 ; 2 D == Shift-Left on Terminal. */
+		    case 'A': /* Esc O 1 ; 2 A == Shift-Up on
+			       * Xfce4-terminal. */
+		    case 'B': /* Esc O 1 ; 2 B == Shift-Down on
+			       * Xfce4-terminal. */
+		    case 'C': /* Esc O 1 ; 2 C == Shift-Right on
+			       * Xfce4-terminal. */
+		    case 'D': /* Esc O 1 ; 2 D == Shift-Left on
+			       * Xfce4-terminal. */
 			shift_held = TRUE;
 			return arrow_from_abcd(seq[4]);
-		    case 'P': /* Esc O 1 ; 2 P == F13 on Terminal. */
+		    case 'P': /* Esc O 1 ; 2 P == F13 on Xfce4-terminal. */
 			return KEY_F(13);
-		    case 'Q': /* Esc O 1 ; 2 Q == F14 on Terminal. */
+		    case 'Q': /* Esc O 1 ; 2 Q == F14 on Xfce4-terminal. */
 			return KEY_F(14);
-		    case 'R': /* Esc O 1 ; 2 R == F15 on Terminal. */
+		    case 'R': /* Esc O 1 ; 2 R == F15 on Xfce4-terminal. */
 			return KEY_F(15);
-		    case 'S': /* Esc O 1 ; 2 S == F16 on Terminal. */
+		    case 'S': /* Esc O 1 ; 2 S == F16 on Xfce4-terminal. */
 			return KEY_F(16);
 		}
 		break;
 	    case '5':
 		switch (seq[4]) {
-		    case 'A': /* Esc O 1 ; 5 A == Ctrl-Up on Terminal. */
+		    case 'A': /* Esc O 1 ; 5 A == Ctrl-Up on
+			       * Xfce4-terminal. */
 			return CONTROL_UP;
-		    case 'B': /* Esc O 1 ; 5 B == Ctrl-Down on Terminal. */
+		    case 'B': /* Esc O 1 ; 5 B == Ctrl-Down on
+			       * Xfce4-terminal. */
 			return CONTROL_DOWN;
-		    case 'C': /* Esc O 1 ; 5 C == Ctrl-Right on Terminal. */
+		    case 'C': /* Esc O 1 ; 5 C == Ctrl-Right on
+			       * Xfce4-terminal. */
 			return CONTROL_RIGHT;
-		    case 'D': /* Esc O 1 ; 5 D == Ctrl-Left on Terminal. */
+		    case 'D': /* Esc O 1 ; 5 D == Ctrl-Left on
+			       * Xfce4-terminal. */
 			return CONTROL_LEFT;
 		}
 		break;
@@ -757,9 +765,9 @@
 		    case 'E': /* Esc O E == Center (5) on numeric keypad
 			       * with NumLock off on xterm. */
 			return KEY_B2;
-		    case 'F': /* Esc O F == End on xterm/Terminal. */
+		    case 'F': /* Esc O F == End on xterm/Xfce4-terminal. */
 			return KEY_END;
-		    case 'H': /* Esc O H == Home on xterm/Terminal. */
+		    case 'H': /* Esc O H == Home on xterm/Xfce4-terminal. */
 			return KEY_HOME;
 		    case 'M': /* Esc O M == Enter on numeric keypad with
 			       * NumLock off on VT100/VT220/VT320/xterm/
@@ -799,47 +807,47 @@
 			return CONTROL_LEFT;
 		    case 'j': /* Esc O j == '*' on numeric keypad with
 			       * NumLock off on VT100/VT220/VT320/xterm/
-			       * rxvt/Eterm/Terminal. */
+			       * rxvt/Eterm/Xfce4-terminal. */
 			return '*';
 		    case 'k': /* Esc O k == '+' on numeric keypad with
 			       * NumLock off on VT100/VT220/VT320/xterm/
-			       * rxvt/Eterm/Terminal. */
+			       * rxvt/Eterm/Xfce4-terminal. */
 			return '+';
 		    case 'l': /* Esc O l == ',' on numeric keypad with
 			       * NumLock off on VT100/VT220/VT320/xterm/
-			       * rxvt/Eterm/Terminal. */
+			       * rxvt/Eterm/Xfce4-terminal. */
 			return ',';
 		    case 'm': /* Esc O m == '-' on numeric keypad with
 			       * NumLock off on VT100/VT220/VT320/xterm/
-			       * rxvt/Eterm/Terminal. */
+			       * rxvt/Eterm/Xfce4-terminal. */
 			return '-';
 		    case 'n': /* Esc O n == Delete (.) on numeric keypad
 			       * with NumLock off on VT100/VT220/VT320/
-			       * xterm/rxvt/Eterm/Terminal. */
+			       * xterm/rxvt/Eterm/Xfce4-terminal. */
 			return KEY_DC;
 		    case 'o': /* Esc O o == '/' on numeric keypad with
 			       * NumLock off on VT100/VT220/VT320/xterm/
-			       * rxvt/Eterm/Terminal. */
+			       * rxvt/Eterm/Xfce4-terminal. */
 			return '/';
 		    case 'p': /* Esc O p == Insert (0) on numeric keypad
 			       * with NumLock off on VT100/VT220/VT320/
-			       * rxvt/Eterm/Terminal. */
+			       * rxvt/Eterm/Xfce4-terminal. */
 			return KEY_IC;
 		    case 'q': /* Esc O q == End (1) on numeric keypad
 			       * with NumLock off on VT100/VT220/VT320/
-			       * rxvt/Eterm/Terminal. */
+			       * rxvt/Eterm/Xfce4-terminal. */
 			return KEY_END;
 		    case 'r': /* Esc O r == Down (2) on numeric keypad
 			       * with NumLock off on VT100/VT220/VT320/
-			       * rxvt/Eterm/Terminal. */
+			       * rxvt/Eterm/Xfce4-terminal. */
 			return KEY_DOWN;
 		    case 's': /* Esc O s == PageDown (3) on numeric
 			       * keypad with NumLock off on VT100/VT220/
-			       * VT320/rxvt/Eterm/Terminal. */
+			       * VT320/rxvt/Eterm/Xfce4-terminal. */
 			return KEY_NPAGE;
 		    case 't': /* Esc O t == Left (4) on numeric keypad
 			       * with NumLock off on VT100/VT220/VT320/
-			       * rxvt/Eterm/Terminal. */
+			       * rxvt/Eterm/Xfce4-terminal. */
 			return KEY_LEFT;
 		    case 'u': /* Esc O u == Center (5) on numeric keypad
 			       * with NumLock off on VT100/VT220/VT320/
@@ -847,19 +855,19 @@
 			return KEY_B2;
 		    case 'v': /* Esc O v == Right (6) on numeric keypad
 			       * with NumLock off on VT100/VT220/VT320/
-			       * rxvt/Eterm/Terminal. */
+			       * rxvt/Eterm/Xfce4-terminal. */
 			return KEY_RIGHT;
 		    case 'w': /* Esc O w == Home (7) on numeric keypad
 			       * with NumLock off on VT100/VT220/VT320/
-			       * rxvt/Eterm/Terminal. */
+			       * rxvt/Eterm/Xfce4-terminal. */
 			return KEY_HOME;
 		    case 'x': /* Esc O x == Up (8) on numeric keypad
 			       * with NumLock off on VT100/VT220/VT320/
-			       * rxvt/Eterm/Terminal. */
+			       * rxvt/Eterm/Xfce4-terminal. */
 			return KEY_UP;
 		    case 'y': /* Esc O y == PageUp (9) on numeric keypad
 			       * with NumLock off on VT100/VT220/VT320/
-			       * rxvt/Eterm/Terminal. */
+			       * rxvt/Eterm/Xfce4-terminal. */
 			return KEY_PPAGE;
 		}
 		break;
@@ -995,21 +1003,21 @@
 			    }
 			} else if (seq_len > 2 && seq[2] == '~')
 			    /* Esc [ 2 ~ == Insert on VT220/VT320/
-			     * Linux console/xterm/Terminal. */
+			     * Linux console/xterm/Xfce4-terminal. */
 			    return KEY_IC;
 			break;
 		    case '3': /* Esc [ 3 ~ == Delete on VT220/VT320/
-			       * Linux console/xterm/Terminal. */
+			       * Linux console/xterm/Xfce4-terminal. */
 			return KEY_DC;
 		    case '4': /* Esc [ 4 ~ == End on VT220/VT320/Linux
 			       * console/xterm. */
 			return KEY_END;
 		    case '5': /* Esc [ 5 ~ == PageUp on VT220/VT320/
-			       * Linux console/xterm/Terminal;
+			       * Linux console/xterm/Xfce4-terminal;
 			       * Esc [ 5 ^ == PageUp on Eterm. */
 			return KEY_PPAGE;
 		    case '6': /* Esc [ 6 ~ == PageDown on VT220/VT320/
-			       * Linux console/xterm/Terminal;
+			       * Linux console/xterm/Xfce4-terminal;
 			       * Esc [ 6 ^ == PageDown on Eterm. */
 			return KEY_NPAGE;
 		    case '7': /* Esc [ 7 ~ == Home on rxvt. */
@@ -1022,20 +1030,20 @@
 			return KEY_IC;
 		    case 'A': /* Esc [ A == Up on ANSI/VT220/Linux
 			       * console/FreeBSD console/Mach console/
-			       * rxvt/Eterm/Terminal. */
+			       * rxvt/Eterm/Xfce4-terminal. */
 		    case 'B': /* Esc [ B == Down on ANSI/VT220/Linux
 			       * console/FreeBSD console/Mach console/
-			       * rxvt/Eterm/Terminal. */
+			       * rxvt/Eterm/Xfce4-terminal. */
 		    case 'C': /* Esc [ C == Right on ANSI/VT220/Linux
 			       * console/FreeBSD console/Mach console/
-			       * rxvt/Eterm/Terminal. */
+			       * rxvt/Eterm/Xfce4-terminal. */
 		    case 'D': /* Esc [ D == Left on ANSI/VT220/Linux
 			       * console/FreeBSD console/Mach console/
-			       * rxvt/Eterm/Terminal. */
+			       * rxvt/Eterm/Xfce4-terminal. */
 			return arrow_from_abcd(seq[1]);
 		    case 'E': /* Esc [ E == Center (5) on numeric keypad
 			       * with NumLock off on FreeBSD console/
-			       * Terminal. */
+			       * Xfce4-terminal. */
 			return KEY_B2;
 		    case 'F': /* Esc [ F == End on FreeBSD console/Eterm. */
 			return KEY_END;
