aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/terminal/terminal.cc
diff options
context:
space:
mode:
authorGravatar John Hood <cgull@glup.org>2015-12-21 19:13:43 -0500
committerGravatar John Hood <cgull@glup.org>2015-12-24 22:27:17 -0500
commit2ac3bbeb9b29f81806e0e135989d89172eb97b34 (patch)
treefdc696879cce14b7eec4bc2ad13f577ca042b803 /src/terminal/terminal.cc
parent90a529b18a91ed29cba5387c874d45fa1fbfaea2 (diff)
Fix prediction unicode bug. Make all Cell members private.
Fixes #702.
Diffstat (limited to 'src/terminal/terminal.cc')
-rw-r--r--src/terminal/terminal.cc11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/terminal/terminal.cc b/src/terminal/terminal.cc
index e753cd6..443d9c6 100644
--- a/src/terminal/terminal.cc
+++ b/src/terminal/terminal.cc
@@ -107,7 +107,7 @@ void Emulator::print( const Parser::Print *act )
fb.reset_cell( this_cell );
this_cell->append( ch );
- this_cell->width = chwidth;
+ this_cell->set_width( chwidth );
fb.apply_renditions_to_cell( this_cell );
if ( chwidth == 2 ) { /* erase overlapped cell */
@@ -128,18 +128,17 @@ void Emulator::print( const Parser::Print *act )
break;
}
- if ( combining_cell->contents.size() == 0 ) {
+ if ( combining_cell->empty() ) {
/* cell starts with combining character */
/* ... but isn't necessarily the target for a new
base character [e.g. start of line], if the
combining character has been cleared with
a sequence like ED ("J") or EL ("K") */
- assert( combining_cell->width == 1 );
- combining_cell->fallback = true;
+ assert( combining_cell->get_width() == 1 );
+ combining_cell->set_fallback( true );
fb.ds.move_col( 1, true, true );
}
- if ( combining_cell->contents.size() < 32 ) {
- /* seems like a reasonable limit on combining characters */
+ if ( !combining_cell->full() ) {
combining_cell->append( ch );
}
act->handled = true;