diff options
author | Jesse Luehrs <doy@tozt.net> | 2019-11-08 09:48:45 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2019-11-08 09:51:25 -0500 |
commit | dbeb15e1104d682c118ff3916af797279d080405 (patch) | |
tree | 6b0d2f9ac76097b4ee3b4312ac84c1a0022753c7 /src | |
parent | 47da8f77f27174740c20c1cef99daac15f0bf9e8 (diff) | |
download | vt100-rust-dbeb15e1104d682c118ff3916af797279d080405.tar.gz vt100-rust-dbeb15e1104d682c118ff3916af797279d080405.zip |
don't leave old character data in the second cell of a wide character
otherwise it might confuse the diffing algorithm if a non-wide character
is written there and then it goes back to being the second cell of a
wide character
Diffstat (limited to 'src')
-rw-r--r-- | src/screen.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/screen.rs b/src/screen.rs index 1a748e0..7224f6a 100644 --- a/src/screen.rs +++ b/src/screen.rs @@ -504,7 +504,13 @@ impl Screen { } } else { cell.set(c.to_string(), attrs); - self.grid_mut().col_inc(width); + self.grid_mut().col_inc(1); + if width > 1 { + let bgcolor = self.attrs.bgcolor; + let next_cell = self.current_cell_mut(); + next_cell.clear(bgcolor); + self.grid_mut().col_inc(1); + } } } |