Describe Cell width as a narrow/wide boolean.

A character cell can only be either narrow or wide.  It's more
convenient to represent that as an int containing 1 or 2, but slightly
more correct to represent it as a "boolean" single-bit integer.
This commit is contained in:
John Hood
2016-11-15 21:18:18 -05:00
committed by john hood
parent 71fe4441ef
commit 302c7deb41
4 changed files with 14 additions and 13 deletions
+2 -2
View File
@@ -280,7 +280,7 @@ void NotificationEngine::apply( Framebuffer &fb ) const
this_cell->get_renditions().background_color = 44;
this_cell->append( ch );
this_cell->set_width( chwidth );
this_cell->set_wide( chwidth == 2 );
combining_cell = this_cell;
overlay_col += chwidth;
@@ -291,7 +291,7 @@ void NotificationEngine::apply( Framebuffer &fb ) const
}
if ( combining_cell->empty() ) {
assert( combining_cell->get_width() == 1 );
assert( !combining_cell->get_wide() );
combining_cell->set_fallback( true );
overlay_col++;
}