Handle cursor key mode (application vs. ANSI). "less" now works.

This commit is contained in:
Keith Winstein
2011-02-03 03:56:02 -05:00
parent 4ca5b35d7d
commit 5a3c4a201b
9 changed files with 41 additions and 14 deletions
+3 -1
View File
@@ -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 ), cursor_visible( true )
insert_mode( false ), cursor_visible( true ), application_mode_cursor_keys( false )
{
for ( int i = 0; i < width; i++ ) {
tabs[ i ] = ( (i % 8) == 0 );
@@ -346,6 +346,8 @@ void Framebuffer::soft_reset( void )
{
ds.insert_mode = false;
ds.origin_mode = false;
ds.cursor_visible = true; /* per xterm and gnome-terminal */
ds.application_mode_cursor_keys = false;
ds.set_scrolling_region( 0, ds.get_height() - 1 );
ds.clear_renditions();
ds.clear_saved_cursor();