Do not use AlternateMode
This commit is contained in:
parent
a366ba9ca1
commit
054433053b
1 changed files with 3 additions and 8 deletions
11
src/main.rs
11
src/main.rs
|
@ -133,7 +133,6 @@ fn run_bot(mut terminal: Terminal<CrosstermBackend<&io::Stdout>>) {
|
||||||
// Enter a loop (not for debugging)
|
// Enter a loop (not for debugging)
|
||||||
loop {
|
loop {
|
||||||
let _ = enable_raw_mode();
|
let _ = enable_raw_mode();
|
||||||
let _ = execute!(terminal.backend_mut(), EnterAlternateScreen, EnableMouseCapture);
|
|
||||||
|
|
||||||
this.run_once(old);
|
this.run_once(old);
|
||||||
|
|
||||||
|
@ -142,15 +141,11 @@ fn run_bot(mut terminal: Terminal<CrosstermBackend<&io::Stdout>>) {
|
||||||
ui(f, &this);
|
ui(f, &this);
|
||||||
}).unwrap();
|
}).unwrap();
|
||||||
|
|
||||||
this.idle();
|
|
||||||
|
|
||||||
disable_raw_mode().unwrap();
|
disable_raw_mode().unwrap();
|
||||||
execute!(
|
|
||||||
terminal.backend_mut(),
|
|
||||||
LeaveAlternateScreen,
|
|
||||||
DisableMouseCapture
|
|
||||||
).unwrap();
|
|
||||||
terminal.show_cursor().unwrap();
|
terminal.show_cursor().unwrap();
|
||||||
|
|
||||||
|
this.idle();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue