projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rocco Rutte:
[apps/madmutt.git]
/
sidebar.c
diff --git
a/sidebar.c
b/sidebar.c
index
57043ba
..
92a0d2a
100644
(file)
--- 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':
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);
if (!opt) {
snprintf (tmp, sizeof (tmp), "%%%sd", fmt);
snprintf (dest, destlen, tmp, c ? Context->unread : b->msg_unread);
@@
-217,9
+225,12
@@
int make_sidebar_entry (char* box, int idx, size_t len)
else
#endif
if (l_m > 0 && str_ncmp (box, Maildir, l_m) == 0 &&
else
#endif
if (l_m > 0 && str_ncmp (box, Maildir, l_m) == 0 &&
- str_len (box) > l_m)
+ str_len (box) > l_m)
{
box += l_m;
box += l_m;
- else
+ if (Maildir[strlen(Maildir)-1]!='/') {
+ box += 1;
+ }
+ } else
box = basename (box);
if (option (OPTSHORTENHIERARCHY) && str_len (box) > len-lencnt-1) {
box = basename (box);
if (option (OPTSHORTENHIERARCHY) && str_len (box) > len-lencnt-1) {