From 25c7cd8635a64de74b6abecd760553ca9f46fd43 Mon Sep 17 00:00:00 2001
From: ticki <ticki@users.noreply.github.com>
Date: Sat, 23 Jul 2016 22:06:17 +0200
Subject: [PATCH] Fix Redox raw mode

---
 src/raw.rs | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/src/raw.rs b/src/raw.rs
index 6cd673d5..2bf96e78 100644
--- a/src/raw.rs
+++ b/src/raw.rs
@@ -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 }
         })
     }
 }
-- 
GitLab