- /* get attributes for divider */
- SETCOLOR(MT_COLOR_STATUS);
-#ifndef USE_SLANG_CURSES
- attr_get(&attrs, &color_pair, 0);
-#else
- color_pair = attr_get();
-#endif
- SETCOLOR(MT_COLOR_NORMAL);
-
- /* draw the divider */
-
- for ( ; lines < LINES-1-(menu != MENU_PAGER); lines++ ) {
- move(lines, SidebarWidth - 1);
- addch('|');
- #ifndef USE_SLANG_CURSES
- mvchgat(lines, SidebarWidth - 1, 1, 0, color_pair, NULL);
- #endif
- }
- if ( Incoming == 0 ) return 0;
- lines = option(OPTHELP) ? 1 : 0; /* go back to the top */
-
- if ( known_lines != LINES || TopBuffy == 0 || BottomBuffy == 0 )
- calc_boundaries(menu);
- if ( CurBuffy == 0 ) CurBuffy = Incoming;
-
- tmp = TopBuffy;
-
- SETCOLOR(MT_COLOR_NORMAL);
-
- for ( ; tmp && lines < LINES-1 - (menu != MENU_PAGER); tmp = tmp->next ) {
- if ( tmp == CurBuffy )
- SETCOLOR(MT_COLOR_INDICATOR);
- else if ( tmp->msg_unread > 0 )
- SETCOLOR(MT_COLOR_NEW);
- else
- SETCOLOR(MT_COLOR_NORMAL);
-
- move( lines, 0 );
- if ( Context && !strcmp( tmp->path, Context->path ) ) {
- printw( "%.*s", SidebarWidth,
- make_sidebar_entry(basename(tmp->path), Context->msgcount,
- Context->unread));
- tmp->msg_unread = Context->unread;
- tmp->msgcount = Context->msgcount;
- }
- else
- printw( "%.*s", SidebarWidth,
- make_sidebar_entry(basename(tmp->path), tmp->msgcount,
- tmp->msg_unread));
- lines++;
- }
- SETCOLOR(MT_COLOR_NORMAL);
- for ( ; lines < LINES - 1 - (menu != MENU_PAGER); lines++ ) {
- int i = 0;
- move( lines, 0 );
- for ( ; i < SidebarWidth - 1; i++ )
- addch(' ');
- }
- return 0;
+ if ( Incoming == 0 ) return 0;
+ lines = option(OPTHELP) ? 1 : 0; /* go back to the top */
+
+ if (cur_is_hidden (LINES-1-(menu != MENU_PAGER)))
+ CurBuffy = TopBuffy;
+
+ if ( known_lines != LINES || TopBuffy == 0 || BottomBuffy == 0 )
+ calc_boundaries(menu);
+ if ( CurBuffy == 0 ) CurBuffy = Incoming;
+
+ tmp = TopBuffy;
+
+ for ( ; tmp && lines < LINES-1 - (menu != MENU_PAGER || option (OPTSTATUSONTOP)); tmp = tmp->next ) {
+ if ( tmp == CurBuffy )
+ SETCOLOR(MT_COLOR_INDICATOR);
+ else if ( tmp->msg_unread > 0 )
+ SETCOLOR(MT_COLOR_NEW);
+ else
+ SETCOLOR(MT_COLOR_NORMAL);
+
+ move( lines, 0 );
+ if ( Context && !strcmp( tmp->path, Context->path ) ) {
+ printw( "%.*s", SidebarWidth - delim_len,
+ make_sidebar_entry(basename(tmp->path),
+ Context->msgcount, Context->unread));
+ tmp->msg_unread = Context->unread;
+ tmp->msgcount = Context->msgcount;
+ }
+ else
+ printw( "%.*s", SidebarWidth - delim_len,
+ make_sidebar_entry(basename(tmp->path),
+ tmp->msgcount,tmp->msg_unread));
+ 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;