void redrawRestOfScreen ( ) { int linesToRepaint = terminal . getHeight ( ) - getFooterSize ( ) - frameLine ; LinkedList < String > toRepaintLines = new LinkedList < String > ( ) ; String currentLine = getContent ( getLine ( ) ) ; toRepaintLines . addAll ( toDisplayLines ( currentLine ) ) ; //Remove already shown lines int remainingLines = Math . max ( 0 , getColumn ( ) - 1 ) / terminal . getWidth ( ) ; for ( int r = 0 ; r < remainingLines ; r ++ ) { toRepaintLines . removeFirst ( ) ; } boolean eof = false ; for ( int l = 1 ; toRepaintLines . size ( ) < linesToRepaint && ! eof ; l ++ ) { try { toRepaintLines . addAll ( toDisplayLines ( getContent ( getLine ( ) + l ) ) ) ; } catch ( Exception e ) { eof = true ; } } saveCursorPosition ( ) ; for ( int l = 0 ; l < linesToRepaint ; l ++ ) { console . out ( ) . print ( ansi ( ) . cursor ( frameLine + getHeaderSize ( ) + l , 1 ) ) ; console . out ( ) . print ( ansi ( ) . eraseLine ( Erase . FORWARD ) ) ; if ( toRepaintLines . size ( ) > l ) { displayText ( toRepaintLines . get ( l ) ) ; } else { displayText ( "" ) ; } } restoreCursorPosition ( ) ; }
Redraws content from the current line to the end of the frame .