From 73aa48b772e8c3044ea7f4618bf71da7f236f2bc Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Sat, 14 May 2016 22:14:37 +0200
Subject: [PATCH] input: after an unknown sequence, reenable cursor only when
 in main menu

When in the browser, typing keys that produce an unknown escape sequence
should not switch on the cursor.
---
 src/winio.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/winio.c b/src/winio.c
index f9b88280..ad7dbf50 100644
--- a/src/winio.c
+++ b/src/winio.c
@@ -1110,8 +1110,11 @@ int parse_escape_sequence(WINDOW *win, int kbinput)
 	    /* TRANSLATORS: This refers to a sequence of escape codes
 	     * (from the keyboard) that nano does not know about. */
 	    statusbar(_("Unknown sequence"));
-	    reset_cursor();
-	    curs_set(1);
+	    suppress_cursorpos = FALSE;
+	    if (currmenu == MMAIN) {
+		reset_cursor();
+		curs_set(1);
+	    }
 	    beep();
 	}
     }
-- 
GitLab