aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/terminal/terminal.cc
diff options
context:
space:
mode:
authorGravatar John Hood <cgull@glup.org>2016-11-07 00:37:53 -0500
committerGravatar John Hood <cgull@glup.org>2017-08-06 22:21:56 -0400
commit43785eb820de0175d0d98ca12abcde86ffb7b740 (patch)
tree89f3d453c29d16953f2db47286df528ee631ccdd /src/terminal/terminal.cc
parent8ca8a54e11d3ce359487eff5a7ecf5f4e0533c6a (diff)
Collapse nested conditionals.
Diffstat (limited to 'src/terminal/terminal.cc')
-rw-r--r--src/terminal/terminal.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/terminal/terminal.cc b/src/terminal/terminal.cc
index 2f9119b..5a010e6 100644
--- a/src/terminal/terminal.cc
+++ b/src/terminal/terminal.cc
@@ -109,10 +109,9 @@ void Emulator::print( const Parser::Print *act )
this_cell->set_wide( chwidth == 2 ); /* chwidth had better be 1 or 2 here */
fb.apply_renditions_to_cell( this_cell );
- if ( chwidth == 2 ) { /* erase overlapped cell */
- if ( fb.ds.get_cursor_col() + 1 < fb.ds.get_width() ) {
- fb.reset_cell( fb.get_mutable_cell( fb.ds.get_cursor_row(), fb.ds.get_cursor_col() + 1 ) );
- }
+ if ( chwidth == 2
+ && fb.ds.get_cursor_col() + 1 < fb.ds.get_width() ) { /* erase overlapped cell */
+ fb.reset_cell( fb.get_mutable_cell( fb.ds.get_cursor_row(), fb.ds.get_cursor_col() + 1 ) );
}
fb.ds.move_col( chwidth, true, true );