X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=lib%2Fregexp-fields.cc;h=539915d892f9529d3d011dfa7611bb37aba718d2;hb=bfcf9a6c102af9232b6d2e720f919ff1c9b431f8;hp=7e9d959c9b0bc15ffc5b10a9754246750384e668;hpb=c62c22c9fb222d43d9b9956ce6b6e9985019ea2d;p=notmuch diff --git a/lib/regexp-fields.cc b/lib/regexp-fields.cc index 7e9d959c..539915d8 100644 --- a/lib/regexp-fields.cc +++ b/lib/regexp-fields.cc @@ -227,7 +227,8 @@ RegexpFieldProcessor::operator() (const std::string & str) * phrase parsing, when possible */ std::string query_str; - if (*str.rbegin () != '*' || str.find (' ') != std::string::npos) + if ((str.at (0) != '(' || *str.rbegin () != ')') && + (*str.rbegin () != '*' || str.find (' ') != std::string::npos)) query_str = '"' + str + '"'; else query_str = str;