Speed up back color erase -- no more loop over all cells

This commit is contained in:
Keith Winstein
2011-02-10 20:32:39 -05:00
parent 0fb343292a
commit 7d1013681f
5 changed files with 47 additions and 74 deletions
+3 -3
View File
@@ -49,7 +49,7 @@ void Emulator::print( Parser::Print *act )
if ( fb.ds.auto_wrap_mode
&& (chwidth == 2)
&& (fb.ds.get_cursor_col() == fb.ds.get_width() - 1) ) {
this_cell->reset();
fb.reset_cell( this_cell );
fb.get_row( -1 )->wrap = false;
/* There doesn't seem to be a consistent way to get the
downstream terminal emulator to set the wrap-around
@@ -67,14 +67,14 @@ void Emulator::print( Parser::Print *act )
this_cell = fb.get_cell();
this_cell->reset();
fb.reset_cell( this_cell );
this_cell->contents.push_back( act->ch );
this_cell->width = chwidth;
fb.apply_renditions_to_current_cell();
if ( chwidth == 2 ) { /* erase overlapped cell */
if ( fb.ds.get_cursor_col() + 1 < fb.ds.get_width() ) {
fb.get_cell( fb.ds.get_cursor_row(), fb.ds.get_cursor_col() + 1 )->reset();
fb.reset_cell( fb.get_cell( fb.ds.get_cursor_row(), fb.ds.get_cursor_col() + 1 ) );
}
}