There are many equivalent limit-to-all patterns, but in practice, one
may want to limit to " ~A" in order to prevent the pattern from being
recorded in the history. Thus it is important to detect at least this
pattern and similar ones.
if (op == MUTT_LIMIT)
{
+ char *pbuf;
+
/* drop previous limit pattern */
FREE (&Context->pattern);
if (Context->limit_pattern)
mutt_error _("No messages matched criteria.");
/* record new limit pattern, unless match all */
- if (mutt_strcmp (buf, "~A") != 0)
+ pbuf = buf;
+ while (*pbuf == ' ')
+ pbuf++;
+ if (mutt_strcmp (pbuf, "~A") != 0)
{
Context->pattern = simple;
simple = NULL; /* don't clobber it */