]> granicus.if.org Git - neomutt/commitdiff
Interpret an empty limit as a request to cancel the current limit.
authorTAKAHASHI Tamotsu <ttakah@lapis.plala.or.jp>
Tue, 26 Jul 2005 05:58:29 +0000 (05:58 +0000)
committerTAKAHASHI Tamotsu <ttakah@lapis.plala.or.jp>
Tue, 26 Jul 2005 05:58:29 +0000 (05:58 +0000)
(Closes #1854)

pattern.c

index 19597e7b75bd6be954bdb905029d44aedcb7a370..373392bcb7ace985e9b434bf542491d6be61bcf3 100644 (file)
--- a/pattern.c
+++ b/pattern.c
@@ -1124,8 +1124,15 @@ int mutt_pattern_func (int op, char *prompt)
   int i;
 
   strfcpy (buf, NONULL (Context->pattern), sizeof (buf));
-  if (mutt_get_field (prompt, buf, sizeof (buf), M_PATTERN | M_CLEAR) != 0 || !buf[0])
+  if (mutt_get_field (prompt, buf, sizeof (buf), M_PATTERN | M_CLEAR) != 0)
     return (-1);
+  if (!buf[0])
+  {
+    if (op == M_LIMIT)
+      strfcpy (buf, "~A", sizeof(buf));
+    else
+      return -1;
+  }
 
   mutt_message _("Compiling search pattern...");