From f59abee5bb22660d4aceb3f09bf263c27a1d6dff Mon Sep 17 00:00:00 2001 From: TAKAHASHI Tamotsu Date: Tue, 26 Jul 2005 05:58:29 +0000 Subject: [PATCH] Interpret an empty limit as a request to cancel the current limit. (Closes #1854) --- pattern.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pattern.c b/pattern.c index 19597e7b..373392bc 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..."); -- 2.40.0