void redrawRestOfLine ( ) { //The number of lines to reach the end of the frame. int maxLinesToRepaint = terminal . getHeight ( ) - getFooterSize ( ) - frameLine ; LinkedList < String > toRepaintLines = new LinkedList < String > ( ) ; String currentLine = getContent ( getLine ( ) ) ; toRepaintLines . addAll ( toDisplayLines ( currentLine ) ) ; //Remove already shown lines int remainingLines = ( getColumn ( ) - 1 ) / terminal . getWidth ( ) ; for ( int r = 0 ; r < remainingLines ; r ++ ) { toRepaintLines . removeFirst ( ) ; } saveCursorPosition ( ) ; for ( int l = 0 ; l < Math . min ( maxLinesToRepaint , toRepaintLines . size ( ) ) ; l ++ ) { console . out ( ) . print ( ansi ( ) . cursor ( frameLine + getHeaderSize ( ) + l , 1 ) ) ; console . out ( ) . print ( ansi ( ) . eraseLine ( Erase . FORWARD ) ) ; displayText ( toRepaintLines . get ( l ) ) ; } restoreCursorPosition ( ) ; }
Redraws the rest of the multi line .