]> granicus.if.org Git - mutt/commitdiff
clear prompt when user cancels with ^G from a yes/no prompt
authorMichael Elkins <me@sigpipe.org>
Mon, 12 Apr 2010 01:30:13 +0000 (18:30 -0700)
committerMichael Elkins <me@sigpipe.org>
Mon, 12 Apr 2010 01:30:13 +0000 (18:30 -0700)
curs_lib.c

index 459d559aad9af1a708903e420e9074438a67e6a0..5efd36eedcedf5af8c405beb366472110215040d 100644 (file)
@@ -278,6 +278,12 @@ int mutt_yesorno (const char *msg, int def)
     addstr ((char *) (def == M_YES ? yes : no));
     mutt_refresh ();
   }
+  else
+  {
+    /* when the users cancels with ^G, clear the message stored with
+     * mutt_message() so it isn't displayed when the screen is refreshed. */
+    mutt_clear_error();
+  }
   return (def);
 }