Modularize display code and add representation of wrapped line flag
This commit is contained in:
@@ -27,7 +27,7 @@ void CSI_EL( Framebuffer *fb, Dispatcher *dispatch )
|
||||
clearline( fb, -1, 0, fb->ds.get_cursor_col() );
|
||||
break;
|
||||
case 2: /* all of line */
|
||||
clearline( fb, -1, 0, fb->ds.get_width() - 1 );
|
||||
fb->get_row( -1 )->reset();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -40,18 +40,18 @@ void CSI_ED( Framebuffer *fb, Dispatcher *dispatch ) {
|
||||
case 0: /* active position to end of screen, inclusive */
|
||||
clearline( fb, -1, fb->ds.get_cursor_col(), fb->ds.get_width() - 1 );
|
||||
for ( int y = fb->ds.get_cursor_row() + 1; y < fb->ds.get_height(); y++ ) {
|
||||
clearline( fb, y, 0, fb->ds.get_width() - 1 );
|
||||
fb->get_row( y )->reset();
|
||||
}
|
||||
break;
|
||||
case 1: /* start of screen to active position, inclusive */
|
||||
for ( int y = 0; y < fb->ds.get_cursor_row(); y++ ) {
|
||||
clearline( fb, y, 0, fb->ds.get_width() - 1 );
|
||||
fb->get_row( y )->reset();
|
||||
}
|
||||
clearline( fb, -1, 0, fb->ds.get_cursor_col() );
|
||||
break;
|
||||
case 2: /* entire screen */
|
||||
for ( int y = 0; y < fb->ds.get_height(); y++ ) {
|
||||
clearline( fb, y, 0, fb->ds.get_width() - 1 );
|
||||
fb->get_row( y )->reset();
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -215,7 +215,7 @@ static bool *get_DEC_mode( int param, Framebuffer *fb ) {
|
||||
fb->ds.move_row( 0 );
|
||||
fb->ds.move_col( 0 );
|
||||
for ( int y = 0; y < fb->ds.get_height(); y++ ) {
|
||||
clearline( fb, y, 0, fb->ds.get_width() - 1 );
|
||||
fb->get_row( y )->reset();
|
||||
}
|
||||
return NULL;
|
||||
case 5: /* reverse video */
|
||||
|
||||
Reference in New Issue
Block a user