break;
case 'E':
- snprintf (fmt, sizeof (fmt), "%%%sd", prefix);
- snprintf (dest, destlen, fmt, mutt_messages_in_thread(ctx, hdr, 0));
+ if (!optional)
+ {
+ snprintf (fmt, sizeof (fmt), "%%%sd", prefix);
+ snprintf (dest, destlen, fmt, mutt_messages_in_thread(ctx, hdr, 0));
+ }
+ else if (mutt_messages_in_thread(ctx, hdr, 0) <= 1)
+ optional = 0;
break;
case 'f':
char ifstring[SHORT_STRING], elsestring[SHORT_STRING];
size_t wlen, count, len;
+ prefix[0] = '\0';
destlen--; /* save room for the terminal \0 */
wlen = (flags & M_FORMAT_ARROWCURSOR && option (OPTARROWCURSOR)) ? 3 : 0;