Soft reset

This commit is contained in:
Keith Winstein
2011-02-01 02:48:08 -05:00
parent 73af007db4
commit 6265f192ad
3 changed files with 19 additions and 0 deletions
+9
View File
@@ -313,3 +313,12 @@ void Framebuffer::reset( void )
rows = std::deque<Row>( height, Row( width ) ); rows = std::deque<Row>( height, Row( width ) );
ds = DrawState( width, height ); ds = DrawState( width, height );
} }
void Framebuffer::soft_reset( void )
{
ds.insert_mode = false;
ds.origin_mode = false;
ds.set_scrolling_region( 0, ds.get_height() - 1 );
ds.clear_renditions();
ds.clear_saved_cursor();
}
+2
View File
@@ -100,6 +100,7 @@ namespace Terminal {
void save_cursor( void ); void save_cursor( void );
void restore_cursor( void ); void restore_cursor( void );
void clear_saved_cursor( void ) { save = SavedCursor(); }
DrawState( int s_width, int s_height ); DrawState( int s_width, int s_height );
}; };
@@ -129,6 +130,7 @@ namespace Terminal {
void delete_cell( int row, int col ); void delete_cell( int row, int col );
void reset( void ); void reset( void );
void soft_reset( void );
}; };
} }
+8
View File
@@ -447,3 +447,11 @@ void Esc_RIS( Framebuffer *fb, Dispatcher *dispatch __attribute((unused)) )
} }
static Function func_Esc_RIS( ESCAPE, "c", Esc_RIS ); static Function func_Esc_RIS( ESCAPE, "c", Esc_RIS );
/* soft reset */
void CSI_DECSTR( Framebuffer *fb, Dispatcher *dispatch __attribute((unused)) )
{
fb->soft_reset();
}
static Function func_CSI_DECSTR( CSI, "!p", CSI_DECSTR );