Fix Redox raw mode
This commit is contained in:
parent
9bd833a663
commit
25c7cd8635
10
src/raw.rs
10
src/raw.rs
|
@ -13,8 +13,7 @@ pub struct RawTerminal<W: Write> {
|
||||||
#[cfg(target_os = "redox")]
|
#[cfg(target_os = "redox")]
|
||||||
impl<W: Write> Drop for RawTerminal<W> {
|
impl<W: Write> Drop for RawTerminal<W> {
|
||||||
fn drop(&mut self) {
|
fn drop(&mut self) {
|
||||||
use control::TermWrite;
|
write!(self, csi!("?82h")).unwrap();
|
||||||
self.csi(b"R").unwrap();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -98,11 +97,8 @@ impl<W: Write> IntoRawMode for W {
|
||||||
|
|
||||||
#[cfg(target_os = "redox")]
|
#[cfg(target_os = "redox")]
|
||||||
fn into_raw_mode(mut self) -> io::Result<RawTerminal<W>> {
|
fn into_raw_mode(mut self) -> io::Result<RawTerminal<W>> {
|
||||||
use control::TermWrite;
|
write!(self, csi!("?82h")).map(|_| {
|
||||||
|
RawTerminal { output: self }
|
||||||
self.csi(b"r").map(|_| {
|
|
||||||
let mut res = RawTerminal { output: self };
|
|
||||||
res
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue