diff options
author | Jesse Luehrs <doy@tozt.net> | 2021-03-07 01:21:07 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2021-03-07 01:21:07 -0500 |
commit | 341fed83d687c5285dd074d15356e68982822903 (patch) | |
tree | 623024f0978f61978ff0f4e82dce65f698d2ab6a /src/blocking.rs | |
parent | 8927ec8dafaaca3a14b55bb680b4f7f92fa1ed8b (diff) | |
download | textmode-341fed83d687c5285dd074d15356e68982822903.tar.gz textmode-341fed83d687c5285dd074d15356e68982822903.zip |
simplify, add some more methods
Diffstat (limited to 'src/blocking.rs')
-rw-r--r-- | src/blocking.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/blocking.rs b/src/blocking.rs index c06e0a3..fc608ad 100644 --- a/src/blocking.rs +++ b/src/blocking.rs @@ -39,7 +39,7 @@ impl Textmode { let next = vt100::Parser::new(rows, cols, 0); let self_ = Self { cur, next }; - self_.write_stdout(b"\x1b7\x1b[?47h\x1b[2J\x1b[H\x1b[?25h")?; + self_.write_stdout(super::INIT)?; Ok(self_) } @@ -60,6 +60,6 @@ impl Textmode { impl Drop for Textmode { fn drop(&mut self) { - let _ = self.write_stdout(b"\x1b[?47l\x1b8\x1b[?25h"); + let _ = self.write_stdout(super::DEINIT); } } |