X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=lib%2Fquery.cc;h=3e20f59c8ce9951a1501ac8b7002e2f0a56df7a1;hb=f41a35e2923b0b3ef2f66e91cd30e20b4c1a336a;hp=9266d35f8fc517dbda11d3be9f68a0b47f7105da;hpb=4e5d2f22db290a830c0267f34b519c6138af00ed;p=notmuch diff --git a/lib/query.cc b/lib/query.cc index 9266d35f..3e20f59c 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-> @@ -297,7 +299,8 @@ notmuch_threads_get (notmuch_threads_t *threads) return _notmuch_thread_create (threads->query, threads->query->notmuch, threads->thread_id, - threads->query->query_string); + threads->query->query_string, + threads->query->sort); } void @@ -333,7 +336,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->