- if ( TopBuffy == 0 && BottomBuffy == 0 )
- TopBuffy = Incoming;
- if ( BottomBuffy == 0 ) {
- int count = LINES - 2 - (menu != MENU_PAGER || option (OPTSTATUSONTOP));
- BottomBuffy = TopBuffy;
- while ( --count && BottomBuffy->next )
- BottomBuffy = BottomBuffy->next;
- }
- else if ( TopBuffy == CurBuffy->next ) {
- int count = LINES - 2 - (menu != MENU_PAGER);
- BottomBuffy = CurBuffy;
- tmp = BottomBuffy;
- while ( --count && tmp->prev)
- tmp = tmp->prev;
- TopBuffy = tmp;
- }
- else if ( BottomBuffy == CurBuffy->prev ) {
- int count = LINES - 2 - (menu != MENU_PAGER);
- TopBuffy = CurBuffy;
- tmp = TopBuffy;
- while ( --count && tmp->next )
- tmp = tmp->next;
- BottomBuffy = tmp;