diff options
Diffstat (limited to 'archive.c')
-rw-r--r-- | archive.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/archive.c b/archive.c index 20ea5d0..4c0e9da 100644 --- a/archive.c +++ b/archive.c @@ -136,6 +136,17 @@ static void searchThreads( struct Resp resp; struct List roots = {0}; + if (!strcmp(expr, "ALL")) { + for (size_t i = 0; i < threads.len; ++i) { + struct Data root = { + .type = Number, + .number = threadRoot(dataCheck(threads.ptr[i], List).list) + }; + listPush(&roots, root); + } + goto concat; + } + enum Atom search = atom("search"); concatSearch(imap->w, search, threads, expr); for (; resp = respOk(imapResp(imap)), resp.tag != search; respFree(resp)) { @@ -145,6 +156,7 @@ static void searchThreads( } respFree(resp); +concat: concatIndex(name, roots, threads, envelopes); listFree(roots); } |