X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=lib%2Fregexp-fields.cc;h=5d4cf80aeea6f145630002c45ac31c4bda5f526c;hb=582f255aeba3998428fa489dc22c735bd0b88143;hp=f50da9a3c99baa9841ddb6e1912cff3bc190dbdb;hpb=9f7e851263b96acacc9ea542e9f5d837563fea05;p=notmuch 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;