aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/terminal/terminal.cc
diff options
context:
space:
mode:
authorGravatar Keith Winstein <keithw@mit.edu>2012-04-15 17:11:40 -0400
committerGravatar Keith Winstein <keithw@mit.edu>2012-04-15 17:11:40 -0400
commit6b6747cda734de495d835670cb3c5a1de726bbff (patch)
tree0817a2b2daf3173e100fb4326983834274c462f4 /src/terminal/terminal.cc
parentcd2d482484e590b4f16e0201e0cf4a1ff2be8c65 (diff)
Fix valgrind error with 1-col char then 2-col char in a 1x1 terminal
Diffstat (limited to 'src/terminal/terminal.cc')
-rw-r--r--src/terminal/terminal.cc10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/terminal/terminal.cc b/src/terminal/terminal.cc
index 18e9cdf..41f2b6b 100644
--- a/src/terminal/terminal.cc
+++ b/src/terminal/terminal.cc
@@ -60,12 +60,10 @@ void Emulator::print( const Parser::Print *act )
fb.get_mutable_row( -1 )->set_wrap( true );
fb.ds.move_col( 0 );
fb.move_rows_autoscroll( 1 );
- }
-
- /* wrap 2-cell chars if no room, even without will-wrap flag */
- if ( fb.ds.auto_wrap_mode
- && (chwidth == 2)
- && (fb.ds.get_cursor_col() == fb.ds.get_width() - 1) ) {
+ } else if ( fb.ds.auto_wrap_mode
+ && (chwidth == 2)
+ && (fb.ds.get_cursor_col() == fb.ds.get_width() - 1) ) {
+ /* wrap 2-cell chars if no room, even without will-wrap flag */
fb.reset_cell( this_cell );
fb.get_mutable_row( -1 )->set_wrap( false );
/* There doesn't seem to be a consistent way to get the