From: Thomas Roessler Date: Mon, 15 Jan 2001 10:19:32 +0000 (+0000) Subject: Make ~m usable in $simple_search. From . X-Git-Tag: mutt-1-3-14-rel~11 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7b4a4c63b0d56c7b07982f56d29ae1f72c4ad66e;p=mutt Make ~m usable in $simple_search. From . --- diff --git a/pattern.c b/pattern.c index 182ed633..18c1fe0d 100644 --- a/pattern.c +++ b/pattern.c @@ -257,7 +257,17 @@ int eat_range (pattern_t *pat, BUFFER *s, BUFFER *err) { char *tmp; int do_exclusive = 0; + int skip_quote = 0; + /* + * If simple_search is set to "~m %s", the range will have double quotes + * around it... + */ + if (*s->dptr == '"') + { + s->dptr++; + skip_quote = 1; + } if (*s->dptr == '<') do_exclusive = 1; if ((*s->dptr != '-') && (*s->dptr != '<')) @@ -320,6 +330,9 @@ int eat_range (pattern_t *pat, BUFFER *s, BUFFER *err) else pat->max = M_MAXRANGE; + if (skip_quote && *tmp == '"') + tmp++; + SKIPWS (tmp); s->dptr = tmp; return 0;