Fix tabbing bug

This commit is contained in:
Keith Winstein
2011-01-31 20:26:32 -05:00
parent ea1f8621f1
commit bc5caae26b
3 changed files with 22 additions and 3 deletions
+7 -3
View File
@@ -163,12 +163,16 @@ static Function func_Ctrl_HTS( CONTROL, "\x88", Ctrl_HTS );
void CSI_TBC( Framebuffer *fb, Dispatcher *dispatch )
{
if ( dispatch->getparam( 0, 0 ) == 3 ) { /* clear all tab stops */
int param = dispatch->getparam( 0, 0 );
switch ( param ) {
case 0: /* clear this tab stop */
fb->ds.clear_tab( fb->ds.get_cursor_col() );
break;
case 3: /* clear all tab stops */
for ( int x = 0; x < fb->ds.get_width(); x++ ) {
fb->ds.clear_tab( x );
}
} else {
fb->ds.clear_tab( fb->ds.get_cursor_col() );
break;
}
}