From 803ae8186345728c2d094374a2132c9d13f74ab6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Orhun=20Parmaks=C4=B1z?= Date: Sun, 5 Nov 2023 11:22:23 +0100 Subject: [PATCH] Use stderr for reset function --- src/tui.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tui.rs b/src/tui.rs index a1c164e..72c055e 100644 --- a/src/tui.rs +++ b/src/tui.rs @@ -3,10 +3,10 @@ use crate::event::EventHandler; use crate::ui; use crossterm::event::{DisableMouseCapture, EnableMouseCapture}; use crossterm::terminal::{self, EnterAlternateScreen, LeaveAlternateScreen}; -use std::io; -use std::panic; use ratatui::backend::Backend; use ratatui::Terminal; +use std::io; +use std::panic; /// Representation of a terminal user interface. /// @@ -61,7 +61,7 @@ impl Tui { /// the terminal properties if unexpected errors occur. fn reset() -> AppResult<()> { terminal::disable_raw_mode()?; - crossterm::execute!(io::stdout(), LeaveAlternateScreen, DisableMouseCapture)?; + crossterm::execute!(io::stderr(), LeaveAlternateScreen, DisableMouseCapture)?; Ok(()) }