]> granicus.if.org Git - neomutt/commitdiff
close command prompt when deleting the colon
authorPablo Ovelleiro Corral <pablo1@mailbox.org>
Sun, 23 Dec 2018 17:06:47 +0000 (18:06 +0100)
committerRichard Russon <rich@flatcap.org>
Mon, 7 Jan 2019 15:22:11 +0000 (15:22 +0000)
Fixes #1505

enter.c

diff --git a/enter.c b/enter.c
index 2d66e7609daf6fbe318ac1ea199b8193f36cd812..b134361b0003e807950d1dd10e48c6a98f2e18c2 100644 (file)
--- a/enter.c
+++ b/enter.c
@@ -303,7 +303,13 @@ int mutt_enter_string_full(char *buf, size_t buflen, int col, int flags, bool mu
 
         case OP_EDITOR_BACKSPACE:
           if (state->curpos == 0)
+          {
+            // Pressing backspace when no text is in the command prompt shold exit the prompt
+            if (state->lastchar == 0)
+              goto bye;
+            // Pressing backspace with text in the command prompt should just beep
             BEEP();
+          }
           else
           {
             i = state->curpos;