From: Carl Worth Date: Tue, 9 Mar 2010 18:12:58 +0000 (-0800) Subject: notmuch show: Don't show empty headers. X-Git-Tag: 0.1~64 X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=commitdiff_plain;h=2303d9366e2a4f18173983ab02a0c4d9b05d607c 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. --- 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); } }