X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=lib%2Fquery.cc;h=10f8dc8a1a7aa0ade1ced3ff129e6cf1143d574f;hb=a29f49b943689e426f0d7c1beba8ac8e76b3d76b;hp=9266d35f8fc517dbda11d3be9f68a0b47f7105da;hpb=e2dd4ac00b9979de34bd517fa57de56260d38755;p=notmuch diff --git a/lib/query.cc b/lib/query.cc index 9266d35f..10f8dc8a 100644 --- a/lib/query.cc +++ b/lib/query.cc @@ -125,7 +125,9 @@ notmuch_query_search_messages (notmuch_query_t *query) Xapian::QueryParser::FLAG_WILDCARD | Xapian::QueryParser::FLAG_PURE_NOT); - if (strcmp (query_string, "") == 0) { + if (strcmp (query_string, "") == 0 || + strcmp (query_string, "*") == 0) + { final_query = mail_query; } else { string_query = notmuch->query_parser-> @@ -333,7 +335,9 @@ notmuch_query_count_messages (notmuch_query_t *query) Xapian::QueryParser::FLAG_WILDCARD | Xapian::QueryParser::FLAG_PURE_NOT); - if (strcmp (query_string, "") == 0) { + if (strcmp (query_string, "") == 0 || + strcmp (query_string, "*") == 0) + { final_query = mail_query; } else { string_query = notmuch->query_parser->