aboutsummaryrefslogtreecommitdiff
path: root/notmuch-show.c
diff options
context:
space:
mode:
authorBart Trojanowski <bart@jukie.net>2009-11-24 23:54:35 -0500
committerCarl Worth <cworth@cworth.org>2009-11-27 17:07:18 -0800
commitc984fc43cc841b1453a10f92c227466a2c676364 (patch)
treef34a0bce9a603348559ccff11bb3418e7ef0b4bf /notmuch-show.c
parentbede40987a64b7c2565d771922a3eac0a229ee28 (diff)
notmuch-show: identify which messages printed matched the query string
The show command outputs all messages in the threads that match the search-terms. This patch introduces a 'match:[01]' entry to the 'message{' line output by the show command. Value of 1 indicates that the message is matching the search expression. Signed-off-by: Bart Trojanowski <bart@jukie.net>
Diffstat (limited to 'notmuch-show.c')
-rw-r--r--notmuch-show.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/notmuch-show.c b/notmuch-show.c
index edebaca..f189e94 100644
--- a/notmuch-show.c
+++ b/notmuch-show.c
@@ -155,9 +155,10 @@ show_message (void *ctx, notmuch_message_t *message, int indent)
const char *name, *value;
unsigned int i;
- printf ("\fmessage{ id:%s depth:%d filename:%s\n",
+ printf ("\fmessage{ id:%s depth:%d match:%d filename:%s\n",
notmuch_message_get_message_id (message),
indent,
+ notmuch_message_get_flag (message, NOTMUCH_MSG_FLAG_MATCHING_SEARCH),
notmuch_message_get_filename (message));
printf ("\fheader{\n");