diff options
-rw-r--r-- | CHANGELOG.md | 2 | ||||
-rw-r--r-- | src/grid.rs | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 25f5b56..f958810 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,8 @@ * Fixed VPA incorrectly being clamped to the scroll region. * Stop treating soft hyphen specially (as far as i can tell, no other terminals do this, and i'm not sure why i thought it was necessary to begin with). +* `contents_formatted` now also resets attributes at the start, like + `contents_diff` does. ## [0.3.1] - 2019-11-06 diff --git a/src/grid.rs b/src/grid.rs index 0d075ea..4951d25 100644 --- a/src/grid.rs +++ b/src/grid.rs @@ -137,7 +137,7 @@ impl Grid { } pub fn contents_formatted(&self) -> Vec<u8> { - let mut contents = b"\x1b[H\x1b[J".to_vec(); + let mut contents = b"\x1b[m\x1b[H\x1b[J".to_vec(); let mut prev_attrs = crate::attrs::Attrs::default(); let mut final_col = 0; for row in self.rows() { |