commands.cc
/*
** scroll_up_full_window - scroll listing up one full window,
**                         leaving one line of overlap.  This routine
**                         is only called when we know that the tail\(\)
**                         of the listing is not currently displayed.
*/
scroll listing up one full window,
leaving one line of overlap.  This routine
is only called when we know that the tail\(\)
of the listing is not currently displayed.
scroll listing up one full window leaving one line of overlap . This routine is only called when we know that the tail \ ( \ ) of the listing is not currently displayed .
static void scroll_up_full_window(DirList *dl)
{
    DirLine *ln = dl->lastLine();
    dl->setFirst(ln);
    dl->setCurrLine(ln);
    cursor_home();
    for (int i = 0; i < rows() - 2 && ln; i++, ln = ln->next())
    {
        clear_to_end_of_line();
        display_string(ln->line(), ln->length());
    }
    move_cursor(i, 0);
    for (; i < rows() - 2; i++)
    {
        clear_to_end_of_line();
        cursor_down();
    }
    ln ? dl->setLast(ln->prev()) : dl->setLast(dl->tail());
    dl->saveYXPos(0, goal_column(dl));
    if (dl->currLine()->length() > columns())
        leftshift_current_line(dl);
    else
        move_cursor(0, dl->savedXPos());
    synch_display();
}
static void scroll_up_full_window ( DirList * dl ) { DirLine * ln = dl -> lastLine ( ) ; dl -> setFirst ( ln ) ; dl -> setCurrLine ( ln ) ; cursor_home ( ) ; for ( int i = 0 ; i < rows ( ) - 2 && ln ; i ++ , ln = ln -> next ( ) ) { clear_to_end_of_line ( ) ; display_string ( ln -> line ( ) , ln -> length ( ) ) ; } move_cursor ( i , 0 ) ; for ( ; i < rows ( ) - 2 ; i ++ ) { clear_to_end_of_line ( ) ; cursor_down ( ) ; } ln ? dl -> setLast ( ln -> prev ( ) ) : dl -> setLast ( dl -> tail ( ) ) ; dl -> saveYXPos ( 0 , goal_column ( dl ) ) ; if ( dl -> currLine ( ) -> length ( ) > columns ( ) ) leftshift_current_line ( dl ) ; else move_cursor ( 0 , dl -> savedXPos ( ) ) ; synch_display ( ) ; }
scroll_up_full_window - scroll listing up one full window,
leaving one line of overlap.
scroll_up_full_window - scroll listing up one full window leaving one line of overlap .