Skip to content

Commit ffec314

Browse files
committed
use stdout instead of stderr for the terminal handler
1 parent 37e3978 commit ffec314

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/tui.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ impl<B: Backend> Tui<B> {
2121

2222
pub fn init(&mut self) -> AppResult<()> {
2323
terminal::enable_raw_mode()?;
24-
crossterm::execute!(io::stderr(), EnterAlternateScreen, EnableMouseCapture)?;
24+
crossterm::execute!(io::stdout(), EnterAlternateScreen, EnableMouseCapture)?;
2525

2626
let panic_hook = panic::take_hook();
2727
panic::set_hook(Box::new(move |panic| {
@@ -41,7 +41,7 @@ impl<B: Backend> Tui<B> {
4141

4242
fn reset() -> AppResult<()> {
4343
terminal::disable_raw_mode()?;
44-
crossterm::execute!(io::stderr(), LeaveAlternateScreen, DisableMouseCapture)?;
44+
crossterm::execute!(io::stdout(), LeaveAlternateScreen, DisableMouseCapture)?;
4545
Ok(())
4646
}
4747

0 commit comments

Comments
 (0)