X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=lib%2Fquery.cc;h=7e1b6b52984330d82f6c82462f64d02c2450f0f4;hp=9266d35f8fc517dbda11d3be9f68a0b47f7105da;hb=aadb15a002dc01903d60ca40048d6d4ef3990863;hpb=4e5d2f22db290a830c0267f34b519c6138af00ed diff --git a/lib/query.cc b/lib/query.cc index 9266d35f..7e1b6b52 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-> @@ -146,6 +148,8 @@ notmuch_query_search_messages (notmuch_query_t *query) case NOTMUCH_SORT_MESSAGE_ID: enquire.set_sort_by_value (NOTMUCH_VALUE_MESSAGE_ID, FALSE); break; + case NOTMUCH_SORT_UNSORTED: + break; } #if DEBUG_QUERY @@ -297,7 +301,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 +338,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->