aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2019-12-07 06:05:16 -0500
committerJesse Luehrs <doy@tozt.net>2019-12-07 06:05:16 -0500
commit6f5d88a4835615063e7e6dbdbaceee6494bc0675 (patch)
tree650de951625518c3ab3c39c7e03b5fd9e4e3ae40 /src
parent7152bfd5772f64ec0fc7d7d204f5fd4986104823 (diff)
downloadvt100-rust-6f5d88a4835615063e7e6dbdbaceee6494bc0675.tar.gz
vt100-rust-6f5d88a4835615063e7e6dbdbaceee6494bc0675.zip
clear wide characters if they get half-scrolled off the right
Diffstat (limited to 'src')
-rw-r--r--src/row.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/row.rs b/src/row.rs
index 090619d..76dd1d5 100644
--- a/src/row.rs
+++ b/src/row.rs
@@ -60,6 +60,10 @@ impl Row {
pub fn truncate(&mut self, len: usize) {
self.cells.truncate(len);
self.wrapped = false;
+ let last_cell = self.cells.get_mut(len - 1).unwrap();
+ if last_cell.is_wide() {
+ last_cell.clear(*last_cell.attrs());
+ }
}
pub fn resize(&mut self, len: usize, cell: crate::cell::Cell) {