if (list_empty(Incoming))
return;
+ if (CurBuffy < 0 || CurBuffy >= Incoming->length)
+ CurBuffy = 0;
+ if (TopBuffy < 0 || TopBuffy >= Incoming->length)
+ TopBuffy = 0;
/* correct known_lines if it has changed because of a window resize */
/* if (known_lines != LINES)
known_lines = LINES; */
-
+
lines = LINES - 2 - (menu != MENU_PAGER || option (OPTSTATUSONTOP));
known_lines = lines;
if (option (OPTSIDEBARNEWMAILONLY)) {
#if USE_IMAP
int l = str_len (ImapHomeNamespace);
#endif
+ int l_m = str_len (Maildir);
if (SidebarWidth > COLS)
SidebarWidth = COLS;
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) {