Soft reset
This commit is contained in:
@@ -313,3 +313,12 @@ void Framebuffer::reset( void )
|
||||
rows = std::deque<Row>( height, Row( width ) );
|
||||
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();
|
||||
}
|
||||
|
||||
@@ -100,6 +100,7 @@ namespace Terminal {
|
||||
|
||||
void save_cursor( void );
|
||||
void restore_cursor( void );
|
||||
void clear_saved_cursor( void ) { save = SavedCursor(); }
|
||||
|
||||
DrawState( int s_width, int s_height );
|
||||
};
|
||||
@@ -129,6 +130,7 @@ namespace Terminal {
|
||||
void delete_cell( int row, int col );
|
||||
|
||||
void reset( void );
|
||||
void soft_reset( void );
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -447,3 +447,11 @@ void Esc_RIS( Framebuffer *fb, Dispatcher *dispatch __attribute((unused)) )
|
||||
}
|
||||
|
||||
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 );
|
||||
|
||||
Reference in New Issue
Block a user