aboutsummaryrefslogtreecommitdiffstats
path: root/src/blocking.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2021-03-07 17:33:10 -0500
committerJesse Luehrs <doy@tozt.net>2021-03-07 17:46:02 -0500
commit2c17441816026d92a68d371f6f2c0466fcd1b92b (patch)
tree564b1f357f882aea83105d392769812426f33dbe /src/blocking.rs
parent341fed83d687c5285dd074d15356e68982822903 (diff)
downloadtextmode-2c17441816026d92a68d371f6f2c0466fcd1b92b.tar.gz
textmode-2c17441816026d92a68d371f6f2c0466fcd1b92b.zip
also set the appropriate terminal modes
Diffstat (limited to 'src/blocking.rs')
-rw-r--r--src/blocking.rs13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/blocking.rs b/src/blocking.rs
index fc608ad..538f051 100644
--- a/src/blocking.rs
+++ b/src/blocking.rs
@@ -44,9 +44,16 @@ impl Textmode {
}
pub fn refresh(&mut self) -> std::io::Result<()> {
- let diff = self.next().screen().contents_diff(self.cur().screen());
- self.write_stdout(&diff)?;
- self.cur_mut().process(&diff);
+ let diffs = &[
+ self.next().screen().contents_diff(self.cur().screen()),
+ self.next().screen().input_mode_diff(self.cur().screen()),
+ self.next().screen().title_diff(self.cur().screen()),
+ self.next().screen().bells_diff(self.cur().screen()),
+ ];
+ for diff in diffs {
+ self.write_stdout(&diff)?;
+ self.cur_mut().process(&diff);
+ }
Ok(())
}