X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=sidebar.c;h=92a0d2a06c4c9e046b11c0d4d890599e3a651732;hb=d429e6df5ef16a8dfd7bcbeb25b0260eb8e5d96f;hp=4ea49d4ae17ec5ac28ef06959e48fdb425dfbffc;hpb=e25811a4e3b78d25ccffcbe272b31d625138c61e;p=apps%2Fmadmutt.git diff --git a/sidebar.c b/sidebar.c index 4ea49d4..92a0d2a 100644 --- a/sidebar.c +++ b/sidebar.c @@ -149,6 +149,14 @@ static const char* sidebar_number_format (char* dest, size_t destlen, char op, break; /* new */ case 'n': + if (!opt) { + snprintf (tmp, sizeof (tmp), "%%%sd", fmt); + snprintf (dest, destlen, tmp, c ? Context->new : b->new); + } else if ((c && Context->new == 0) || (!c && b->new == 0)) + opt = 0; + break; + /* unread */ + case 'u': if (!opt) { snprintf (tmp, sizeof (tmp), "%%%sd", fmt); snprintf (dest, destlen, tmp, c ? Context->unread : b->msg_unread);