Used in index_format like this %?g?(%g)? will show nothing if there are
no notmuch labels, eg. in mixed mail setups.
Signed-off-by: David Sterba <dsterba@suse.cz>
break;
#ifdef USE_NOTMUCH
case 'g':
- mutt_format_s (dest, destlen, prefix, nm_header_get_tags(hdr));
+ if (!optional)
+ mutt_format_s (dest, destlen, prefix, nm_header_get_tags(hdr));
+ else if (!nm_header_get_tags(hdr))
+ optional = 0;
break;
#endif
case 'H':
** .dt %E .dd number of messages in current thread
** .dt %f .dd sender (address + real name), either From: or Return-Path:
** .dt %F .dd author name, or recipient name if the message is from you
+ ** .dt %g .dd message labels (e.g. notmuch tags)
** .dt %H .dd spam attribute(s) of this message
** .dt %i .dd message-id of the current message
** .dt %l .dd number of lines in the message (does not work with maildir,