summaryrefslogtreecommitdiffstats
path: root/src/term.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/term.rs')
-rw-r--r--src/term.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/term.rs b/src/term.rs
index b55734d..4d9d228 100644
--- a/src/term.rs
+++ b/src/term.rs
@@ -37,7 +37,7 @@ impl Screen {
pub fn drop_screen(&mut self) {
self.cursor_show().log();
self.to_main_screen().log();
- self.screen = Arc::new(Mutex::new(None));
+ self.screen.lock().map(|mut screen| std::mem::drop(screen.take())).ok();
// Terminal stays fucked without this. Why?
Ok(std::process::Command::new("reset").arg("-I").spawn()).log();