/// Helper function to exit the alternate tui terminal without corrupting the user terminal
Helper function to exit the alternate tui terminal without corrupting the user terminal
Helper function to exit the alternate tui terminal without corrupting the user terminal
fn cleanup_terminal(terminal: &mut Terminal<tui::backend::CrosstermBackend<std::io::Stdout>>) {
    terminal.show_cursor().unwrap();
    terminal.clear().unwrap();
    crossterm::execute!(io::stdout(), LeaveAlternateScreen, DisableMouseCapture).unwrap();
    terminal::disable_raw_mode().unwrap();
}
fn cleanup_terminal ( terminal : & mut Terminal < tui :: backend :: CrosstermBackend < std :: io :: Stdout > > ) { terminal . show_cursor ( ) . unwrap ( ) ; terminal . clear ( ) . unwrap ( ) ; crossterm :: execute ! ( io stdout ( ) LeaveAlternateScreen DisableMouseCapture ) . unwrap ( ) ; terminal :: disable_raw_mode ( ) . unwrap ( ) ; }
Helper function to exit the alternate tui terminal without corrupting the user terminal
Helper function to exit the alternate tui terminal without corrupting the user terminal
terminal
&mut Terminal<tui::backend::CrosstermBackend<std::io::Stdout>>