diff options
Diffstat (limited to 'src/screen.rs')
-rw-r--r-- | src/screen.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/screen.rs b/src/screen.rs index b774c10..c2fef6b 100644 --- a/src/screen.rs +++ b/src/screen.rs @@ -189,7 +189,8 @@ impl Screen { crate::term::HideCursor::new(self.hide_cursor()) ) .unwrap(); - self.grid().write_contents_formatted(contents); + let prev_attrs = self.grid().write_contents_formatted(contents); + self.attrs.write_escape_code_diff(contents, &prev_attrs); } /// Returns the formatted contents of the terminal by row, restricted to @@ -247,7 +248,12 @@ impl Screen { ) .unwrap(); } - self.grid().write_contents_diff(contents, prev.grid()); + let prev_attrs = self.grid().write_contents_diff( + contents, + prev.grid(), + prev.attrs, + ); + self.attrs.write_escape_code_diff(contents, &prev_attrs); } /// Returns a sequence of terminal byte streams sufficient to turn the |