Cursor visibility
This commit is contained in:
+5
-1
@@ -180,8 +180,12 @@ void Emulator::debug_printout( int fd )
|
||||
}
|
||||
|
||||
char curmove[ 32 ];
|
||||
snprintf( curmove, 32, "\033[%d;%dH", fb.ds.get_cursor_row() + 1,
|
||||
if ( fb.ds.cursor_visible ) {
|
||||
snprintf( curmove, 32, "\033[?25h\033[%d;%dH", fb.ds.get_cursor_row() + 1,
|
||||
fb.ds.get_cursor_col() + 1 );
|
||||
} else {
|
||||
snprintf( curmove, 32, "\033[?25l" );
|
||||
}
|
||||
screen.append( curmove );
|
||||
|
||||
swrite( fd, screen.c_str() );
|
||||
|
||||
@@ -47,7 +47,7 @@ DrawState::DrawState( int s_width, int s_height )
|
||||
scrolling_region_top_row( 0 ), scrolling_region_bottom_row( height - 1 ),
|
||||
renditions(), save(),
|
||||
next_print_will_wrap( false ), origin_mode( false ), auto_wrap_mode( true ),
|
||||
insert_mode( false )
|
||||
insert_mode( false ), cursor_visible( true )
|
||||
{
|
||||
for ( int i = 0; i < width; i++ ) {
|
||||
tabs[ i ] = ( (i % 8) == 0 );
|
||||
|
||||
@@ -67,6 +67,7 @@ namespace Terminal {
|
||||
bool origin_mode;
|
||||
bool auto_wrap_mode;
|
||||
bool insert_mode;
|
||||
bool cursor_visible;
|
||||
|
||||
/* bold, etc. */
|
||||
|
||||
|
||||
@@ -220,6 +220,8 @@ static bool *get_DEC_mode( int param, Framebuffer *fb ) {
|
||||
return &(fb->ds.origin_mode);
|
||||
case 7: /* auto wrap */
|
||||
return &(fb->ds.auto_wrap_mode);
|
||||
case 25:
|
||||
return &(fb->ds.cursor_visible);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user