X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=lib%2Fregexp-fields.cc;fp=lib%2Fregexp-fields.cc;h=5d4cf80aeea6f145630002c45ac31c4bda5f526c;hp=f50da9a3c99baa9841ddb6e1912cff3bc190dbdb;hb=d25dcc589ce4c1a87d698c6aef1ce3e38e4a50bb;hpb=168211c5632189c53415d25530b759ad3678c92c diff --git a/lib/regexp-fields.cc b/lib/regexp-fields.cc index f50da9a3..5d4cf80a 100644 --- a/lib/regexp-fields.cc +++ b/lib/regexp-fields.cc @@ -194,7 +194,7 @@ RegexpFieldProcessor::operator() (const std::string & str) * phrase parsing, when possible */ std::string query_str; - if (str.find (' ') != std::string::npos) + if (*str.rbegin () != '*' || str.find (' ') != std::string::npos) query_str = '"' + str + '"'; else query_str = str;