From 2303d9366e2a4f18173983ab02a0c4d9b05d607c Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Tue, 9 Mar 2010 10:12:58 -0800 Subject: [PATCH] notmuch show: Don't show empty headers. This is a fairly old regression. There has always been code to avoid printing empty headers (such as Cc or Bcc with no values), but it has been broken since notmuch_message_get_header was changed to return an empty string rather than a NULL pointer for these fields. --- notmuch-show.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notmuch-show.c b/notmuch-show.c index 36bb0d30..cb5e47aa 100644 --- a/notmuch-show.c +++ b/notmuch-show.c @@ -160,7 +160,7 @@ format_headers_text (const void *ctx, notmuch_message_t *message) for (i = 0; i < ARRAY_SIZE (headers); i++) { name = headers[i]; value = notmuch_message_get_header (message, name); - if (value) + if (value && strlen (value)) printf ("%s: %s\n", name, value); } } -- 2.43.0