diff options
author | Jesse Luehrs <doy@tozt.net> | 2019-12-07 06:05:16 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2019-12-07 06:05:16 -0500 |
commit | 6f5d88a4835615063e7e6dbdbaceee6494bc0675 (patch) | |
tree | 650de951625518c3ab3c39c7e03b5fd9e4e3ae40 /src | |
parent | 7152bfd5772f64ec0fc7d7d204f5fd4986104823 (diff) | |
download | vt100-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.rs | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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) { |