]> granicus.if.org Git - neomutt/commitdiff
catch esc-keypresses in the command prompt devel/prompt-close-with-esc
authorPablo Ovelleiro Corral <pablo1@mailbox.org>
Sat, 29 Dec 2018 11:47:30 +0000 (12:47 +0100)
committerRichard Russon <rich@flatcap.org>
Mon, 21 Oct 2019 19:01:11 +0000 (20:01 +0100)
enter.c

diff --git a/enter.c b/enter.c
index 0c86de0e8f50b44543514964173e6e20cf54762b..cbce36c60223a884ee512b1c35bbc68165b02118 100644 (file)
--- a/enter.c
+++ b/enter.c
@@ -770,6 +770,12 @@ int mutt_enter_string_full(char *buf, size_t buflen, int col,
         }
       }
 
+      /* Close prompt with escape key */
+      if (wc == '\033')
+      {
+        goto bye;
+      }
+
       if ((wc == '\r') || (wc == '\n'))
       {
         /* Convert from wide characters */