+ for (i = TopBuffy; i < Incoming->length && lines < LINES - 1 -
+ (menu != MENU_PAGER || option (OPTSTATUSONTOP)); i++) {
+ tmp = (BUFFY*) Incoming->data[i];
+ if (i == CurBuffy)
+ SETCOLOR (MT_COLOR_INDICATOR);
+ else if (tmp->msg_flagged > 0)
+ SETCOLOR (MT_COLOR_FLAGGED);
+ else if (tmp->msg_unread > 0)
+ SETCOLOR (MT_COLOR_NEW);
+ else
+ SETCOLOR (MT_COLOR_NORMAL);
+
+ move (lines, 0);
+ if (option (OPTSIDEBARNEWMAILONLY)) {
+ if (tmp->msg_unread > 0) {
+ if (Context && !mutt_strcmp (tmp->path, Context->path)) {
+ printw ("%.*s", SidebarWidth - delim_len,
+ make_sidebar_entry (basename (tmp->path),
+ Context->msgcount, Context->unread,
+ Context->flagged));
+ tmp->msg_unread = Context->unread;
+ tmp->msgcount = Context->msgcount;
+ tmp->msg_flagged = Context->flagged;
+ }
+ else
+ printw ("%.*s", SidebarWidth - delim_len,
+ make_sidebar_entry (basename (tmp->path),
+ tmp->msgcount, tmp->msg_unread,
+ tmp->msg_flagged));
+ lines++;
+ }
+ }
+ else {
+ if (Context && !mutt_strcmp (tmp->path, Context->path)) {
+ printw ("%.*s", SidebarWidth - delim_len,
+ make_sidebar_entry (basename (tmp->path),
+ Context->msgcount, Context->unread,
+ Context->flagged));
+ tmp->msg_unread = Context->unread;
+ tmp->msgcount = Context->msgcount;
+ tmp->msg_flagged = Context->flagged;
+ }
+ else
+ printw ("%.*s", SidebarWidth - delim_len,
+ make_sidebar_entry (basename (tmp->path),
+ tmp->msgcount, tmp->msg_unread,
+ tmp->msg_flagged));
+ lines++;
+ }
+ }
+ SETCOLOR (MT_COLOR_NORMAL);
+ for (; lines < LINES - 1 - (menu != MENU_PAGER || option (OPTSTATUSONTOP));
+ lines++) {
+ int i = 0;
+
+ move (lines, 0);
+ for (; i < SidebarWidth - delim_len; i++)
+ addch (' ');
+ }
+ return 0;
+}