Skip to main content

restore_tui

Function restore_tui 

Source
pub fn restore_tui() -> Result<()>
Expand description

Restore terminal to a usable state after a panic

This function attempts to restore the terminal to its original state by disabling raw mode and leaving alternate screen if they were active. It handles all errors internally to ensure cleanup happens even if individual operations fail.

Follows Ratatui recipe: https://ratatui.rs/recipes/apps/panic-hooks/