From: TAKAHASHI Tamotsu Date: Tue, 26 Jul 2005 05:58:29 +0000 (+0000) Subject: Interpret an empty limit as a request to cancel the current limit. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2492adc577f375cf8197fa581afdb0cd5a9182fc;p=neomutt Interpret an empty limit as a request to cancel the current limit. (Closes #1854) --- diff --git a/pattern.c b/pattern.c index 19597e7b7..373392bcb 100644 --- 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...");