From 054433053b7e54fd4b045c85ce67680ed6ce3b3c Mon Sep 17 00:00:00 2001 From: Neshura Date: Sat, 15 Jul 2023 00:09:34 +0200 Subject: [PATCH] Do not use AlternateMode --- src/main.rs | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/main.rs b/src/main.rs index 4e825db..1358c46 100644 --- a/src/main.rs +++ b/src/main.rs @@ -133,7 +133,6 @@ fn run_bot(mut terminal: Terminal>) { // Enter a loop (not for debugging) loop { let _ = enable_raw_mode(); - let _ = execute!(terminal.backend_mut(), EnterAlternateScreen, EnableMouseCapture); this.run_once(old); @@ -142,15 +141,11 @@ fn run_bot(mut terminal: Terminal>) { ui(f, &this); }).unwrap(); - this.idle(); - + disable_raw_mode().unwrap(); - execute!( - terminal.backend_mut(), - LeaveAlternateScreen, - DisableMouseCapture - ).unwrap(); terminal.show_cursor().unwrap(); + + this.idle(); }