From 225ddbe2bf29f583d8685ab8cd7ae29802d562ba Mon Sep 17 00:00:00 2001 From: Keith Winstein Date: Sat, 5 Feb 2011 00:18:50 -0500 Subject: [PATCH] Fix display bug involving back color erase and upper-left cell --- terminal.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/terminal.cpp b/terminal.cpp index 9dcffe8..0de561d 100644 --- a/terminal.cpp +++ b/terminal.cpp @@ -126,7 +126,6 @@ void Emulator::debug_printout( int fd ) fb.back_color_erase(); std::string screen; - screen.append( "\033[H" ); /* set window title */ screen.append( "\033]0;[rtm] " ); @@ -148,7 +147,7 @@ void Emulator::debug_printout( int fd ) for ( int y = 0; y < fb.ds.get_height(); y++ ) { for ( int x = 0; x < fb.ds.get_width(); /* let charwidth handle advance */ ) { char curmove[ 32 ]; - snprintf( curmove, 32, "\033[%d;%dH\033[X", y + 1, x + 1 ); + snprintf( curmove, 32, "\033[%d;%dH", y + 1, x + 1 ); screen.append( curmove ); Cell *cell = fb.get_cell( y, x ); @@ -163,6 +162,9 @@ void Emulator::debug_printout( int fd ) } screen.append( "m" ); + /* clear cell */ + screen.append( "\033[X" ); + /* print cell contents */ /* cells that begin with combining character get combiner attached to no-break space */