void DisplayFilter2::ReDraw ( void ) {

  int64_t LineCounter;
  char * LineBuff;

  if (( LineBuff = new char[(Display->Width)+2] ) == NULL ) {
    printf("cannot allocate scroll buffer.\n");
    exit ( 0 );
  }

  // select the line
  contentfilter->SelectStart(contentfilter->seekline( ScrollLoc.Y ));
  contentfilter->SelectEnd  (contentfilter->LineEnd());
  
   for (LineCounter = 0;  LineCounter < Display->Height; LineCounter++ ) {    
   
     // clear the line buffer
     memset(LineBuff, ' ', (Display->Width - 1)); // clears as it draws (much faster)

     // modify the buffer with whatever content
     if (ScrollLoc.X <= contentfilter->SelectionSize()) {                           // selectionsize = linelength
       contentfilter->SelectionStart( contentfilter->SelectStart() + ScrollLoc.X );  // offset to the scrollloc
       contentfilter->read( LineBuff, (Display->Width - 1)));	
       LineBuff[contentFilter->SelectionSize] = ' ';       	
     } 
     
     LineBuff[(Display->Width - 1)] = '\0';  // terminate
      
     // select next line 
     contentfilter->SelectStart(contentfilter->NextLine());
     contentfilter->SelectEnd  (contentfilter->LineEnd());   
	  
     Display->CursorPos ( 0, LineCounter + 1);
     Display->WriteText ( LineBuff );
	  
   } // end of for
   
 delete[] LineBuff;

}
