diff options
author | Jesse Luehrs <doy@tozt.net> | 2019-11-05 16:49:46 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2019-11-05 16:49:46 -0500 |
commit | 896a24f83585f0f30743e0db6b53e449b54d29f1 (patch) | |
tree | 68c40751137a2a266abe9c18c563bea174870547 /src | |
parent | 9f9c519cbaa5384e666ffa2b5e1cf4f99780ba28 (diff) | |
download | vt100-rust-896a24f83585f0f30743e0db6b53e449b54d29f1.tar.gz vt100-rust-896a24f83585f0f30743e0db6b53e449b54d29f1.zip |
reset attrs at the start of diffs
otherwise they might inherit the attrs state from the end of the
previous state
Diffstat (limited to 'src')
-rw-r--r-- | src/grid.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/grid.rs b/src/grid.rs index 2ded0e2..fb0f7d7 100644 --- a/src/grid.rs +++ b/src/grid.rs @@ -156,7 +156,7 @@ impl Grid { } pub fn contents_diff(&self, prev: &Self) -> Vec<u8> { - let mut contents = vec![]; + let mut contents = b"\x1b[m".to_vec(); let mut prev_attrs = crate::attrs::Attrs::default(); for (idx, (row, prev_row)) in self.rows().zip(prev.rows()).enumerate() { |