Do not use AlternateMode

This commit is contained in:
Neshura 2023-07-15 00:09:34 +02:00
parent a366ba9ca1
commit 054433053b
Signed by: Neshura
GPG key ID: B6983AAA6B9A7A6C

View file

@ -133,7 +133,6 @@ fn run_bot(mut terminal: Terminal<CrosstermBackend<&io::Stdout>>) {
// 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<CrosstermBackend<&io::Stdout>>) {
ui(f, &this);
}).unwrap();
this.idle();
disable_raw_mode().unwrap();
execute!(
terminal.backend_mut(),
LeaveAlternateScreen,
DisableMouseCapture
).unwrap();
terminal.show_cursor().unwrap();
this.idle();
}