From 22f691f1deb06d5873571f6d8d92f5e62c3e078e Mon Sep 17 00:00:00 2001 From: Martin Disch Date: Wed, 27 Mar 2024 13:43:14 +0100 Subject: [PATCH] Fix order of mode restoration --- src/core/utils/term.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/utils/term.rs b/src/core/utils/term.rs index 01d9cc2..c93918e 100644 --- a/src/core/utils/term.rs +++ b/src/core/utils/term.rs @@ -64,9 +64,9 @@ pub fn cleanup( if cleanup_screen { // Reverse order of setup. execute!(out, cursor::Show).map_err(|e| CleanupError::ShowCursor(e.into()))?; - terminal::disable_raw_mode().map_err(|e| CleanupError::DisableRawMode(e.into()))?; execute!(out, event::DisableMouseCapture) .map_err(|e| CleanupError::DisableMouseCapture(e.into()))?; + terminal::disable_raw_mode().map_err(|e| CleanupError::DisableRawMode(e.into()))?; execute!(out, terminal::LeaveAlternateScreen) .map_err(|e| CleanupError::LeaveAlternateScreen(e.into()))?; }