more fixes
[apps/madmutt.git] / pattern.c
index dec82b5..c06f5f8 100644 (file)
--- a/pattern.c
+++ b/pattern.c
@@ -101,7 +101,7 @@ struct pattern_flags {
   '=', M_DUPLICATED, 0, NULL}, {
   '$', M_UNREFERENCED, 0, NULL}, {
   '*', M_REALNAME, 0, NULL}, {
-  0}
+  0, 0, 0, NULL}
 };
 
 static pattern_t *SearchPattern = NULL; /* current search pattern */
@@ -1204,14 +1204,8 @@ int mutt_pattern_func (int op, char *prompt)
 
   strfcpy (buf, NONULL (Context->pattern), sizeof (buf));
   if (prompt || op != M_LIMIT)
-    if (mutt_get_field (prompt, buf, sizeof (buf), M_PATTERN | M_CLEAR) != 0)
+    if (mutt_get_field (prompt, buf, sizeof (buf), M_PATTERN | M_CLEAR) != 0 || !buf[0])
       return (-1);
-  if (!buf[0]) {
-    if (op == M_LIMIT)
-      strncpy (buf, "~A", sizeof (buf));
-    else
-      return (-1);
-  }
 
   mutt_message _("Compiling search pattern...");