pub fn restore()Available on crate feature
crossterm only.Expand description
Restores the terminal to its original state.
This function should be called before the program exits to ensure that the terminal is restored to its original state.
This function will attempt to restore the terminal to its original state by performing the following steps:
- Raw mode is disabled.
- The alternate screen buffer is left.
If either of these steps fail, the error is printed to stderr and ignored.
Use this function over try_restore when you don’t need to handle the error yourself, as
ignoring the error is generally the correct behavior when cleaning up before exiting. If you
need to handle the error yourself, use try_restore instead.
See the module-level documentation for a comparison of all initialization functions and guidance on when to use each one.
§Examples
ratatui::restore();