Fix Redox raw mode

This commit is contained in:
ticki 2016-07-23 22:06:17 +02:00
parent 9bd833a663
commit 25c7cd8635
1 changed files with 3 additions and 7 deletions

View File

@ -13,8 +13,7 @@ pub struct RawTerminal<W: Write> {
#[cfg(target_os = "redox")]
impl<W: Write> Drop for RawTerminal<W> {
fn drop(&mut self) {
use control::TermWrite;
self.csi(b"R").unwrap();
write!(self, csi!("?82h")).unwrap();
}
}
@ -98,11 +97,8 @@ impl<W: Write> IntoRawMode for W {
#[cfg(target_os = "redox")]
fn into_raw_mode(mut self) -> io::Result<RawTerminal<W>> {
use control::TermWrite;
self.csi(b"r").map(|_| {
let mut res = RawTerminal { output: self };
res
write!(self, csi!("?82h")).map(|_| {
RawTerminal { output: self }
})
}
}