projects
/
notmuch.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
test: signed and encrypted part content type indexing
[notmuch.git]
/
notmuch-search.c
diff --git
a/notmuch-search.c
b/notmuch-search.c
index 019e14eea846d6a68fe36a0210318bcd35d84063..380e9d8fbd8f6dffc582cdd0e8788f7dc11b3913 100644
(file)
--- a/
notmuch-search.c
+++ b/
notmuch-search.c
@@
-160,6
+160,7
@@
do_search_threads (search_context_t *ctx)
const char *subject = notmuch_thread_get_subject (thread);
const char *thread_id = notmuch_thread_get_thread_id (thread);
int matched = notmuch_thread_get_matched_messages (thread);
const char *subject = notmuch_thread_get_subject (thread);
const char *thread_id = notmuch_thread_get_thread_id (thread);
int matched = notmuch_thread_get_matched_messages (thread);
+ int files = notmuch_thread_get_total_files (thread);
int total = notmuch_thread_get_total_messages (thread);
const char *relative_date = NULL;
notmuch_bool_t first_tag = TRUE;
int total = notmuch_thread_get_total_messages (thread);
const char *relative_date = NULL;
notmuch_bool_t first_tag = TRUE;
@@
-175,13
+176,23
@@
do_search_threads (search_context_t *ctx)
if (format->is_text_printer) {
/* Special case for the text formatter */
if (format->is_text_printer) {
/* Special case for the text formatter */
- printf ("thread:%s %12s
[%d/%d] %s; %s (
",
+ printf ("thread:%s %12s ",
thread_id,
thread_id,
- relative_date,
+ relative_date);
+ if (total == files)
+ printf ("[%d/%d] %s; %s (",
matched,
total,
sanitize_string (ctx_quote, authors),
sanitize_string (ctx_quote, subject));
matched,
total,
sanitize_string (ctx_quote, authors),
sanitize_string (ctx_quote, subject));
+ else
+ printf ("[%d/%d(%d)] %s; %s (",
+ matched,
+ total,
+ files,
+ sanitize_string (ctx_quote, authors),
+ sanitize_string (ctx_quote, subject));
+
} else { /* Structured Output */
format->map_key (format, "thread");
format->string (format, thread_id);
} else { /* Structured Output */
format->map_key (format, "thread");
format->string (format, thread_id);