X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=sidebar.c;h=ba4d4a49a2b965fbdb60177ad05981c7f95e1635;hp=bdfcd6dddc346fafc390864ff06bffd0da348359;hb=7e48409c3d6fb969706114b3c0962ffa0e112d37;hpb=ba5e3af4ea19e1d20c80941c077039871ec84258 diff --git a/sidebar.c b/sidebar.c index bdfcd6d..ba4d4a4 100644 --- a/sidebar.c +++ b/sidebar.c @@ -189,6 +189,7 @@ int make_sidebar_entry (char* box, int idx, size_t len) #if USE_IMAP int l = str_len (ImapHomeNamespace); #endif + int l_m = str_len (Maildir); if (SidebarWidth > COLS) SidebarWidth = COLS; @@ -211,6 +212,10 @@ int make_sidebar_entry (char* box, int idx, size_t len) box += l + 1; else #endif + if (l_m > 0 && str_ncmp (box, Maildir, l_m) == 0 && + str_len (box) > l_m) + box += l_m + 1; + else box = basename (box); if (option (OPTSHORTENHIERARCHY) && str_len (box) > len-lencnt-1) {