diff options
author | Jesse Luehrs <doy@tozt.net> | 2021-03-07 17:33:10 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2021-03-07 17:46:02 -0500 |
commit | 2c17441816026d92a68d371f6f2c0466fcd1b92b (patch) | |
tree | 564b1f357f882aea83105d392769812426f33dbe /src/async.rs | |
parent | 341fed83d687c5285dd074d15356e68982822903 (diff) | |
download | textmode-2c17441816026d92a68d371f6f2c0466fcd1b92b.tar.gz textmode-2c17441816026d92a68d371f6f2c0466fcd1b92b.zip |
also set the appropriate terminal modes
Diffstat (limited to 'src/async.rs')
-rw-r--r-- | src/async.rs | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/async.rs b/src/async.rs index 5861443..92a4f30 100644 --- a/src/async.rs +++ b/src/async.rs @@ -50,9 +50,16 @@ impl Textmode { } pub async fn refresh(&mut self) -> std::io::Result<()> { - let diff = self.next().screen().contents_diff(self.cur().screen()); - self.write_stdout(&diff).await?; - 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).await?; + self.cur_mut().process(&diff); + } Ok(()) } |