From ed55c4c8922802c28aa619e308e3043985e6072c Mon Sep 17 00:00:00 2001 From: Keith Winstein Date: Mon, 31 Jan 2011 15:55:20 -0500 Subject: [PATCH] Clear wrap flag on control/CSI/ESC --- terminal.cpp | 5 +++-- terminalfunctions.cpp | 4 ++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/terminal.cpp b/terminal.cpp index 02fd6ad..29114e8 100644 --- a/terminal.cpp +++ b/terminal.cpp @@ -41,8 +41,7 @@ std::string Emulator::input( char c, int actfd ) void Emulator::execute( Parser::Execute *act ) { - assert( act->char_present ); - + fb.ds.next_print_will_wrap = false; dispatch.dispatch( CONTROL, act, &fb ); } @@ -103,11 +102,13 @@ void Emulator::print( Parser::Print *act ) void Emulator::CSI_dispatch( Parser::CSI_Dispatch *act ) { + fb.ds.next_print_will_wrap = false; dispatch.dispatch( CSI, act, &fb ); } void Emulator::Esc_dispatch( Parser::Esc_Dispatch *act ) { + fb.ds.next_print_will_wrap = false; /* handle 7-bit ESC-encoding of C1 control characters */ if ( (dispatch.get_dispatch_chars().size() == 0) && (0x40 <= act->ch) diff --git a/terminalfunctions.cpp b/terminalfunctions.cpp index 9e302c7..cb7105d 100644 --- a/terminalfunctions.cpp +++ b/terminalfunctions.cpp @@ -176,6 +176,10 @@ static Function func_CSI_TBC( CSI, "g", CSI_TBC ); static bool *get_DEC_mode( int param, Framebuffer *fb ) { switch ( param ) { + case 3: /* 80/132 */ + fb->ds.move_row( 0 ); + fb->ds.move_col( 0 ); + return NULL; case 6: /* origin */ fb->ds.move_row( 0 ); fb->ds.move_col( 0 );