b7938e069d97f32eebdf33ba139e02601954155e
The previous code called std::process::exit(1) on file load failure, bypassing all terminal restoration (disable_raw_mode, LeaveAlternateScreen, show_cursor). This left the user's shell in a broken state with no echo and no visible cursor. Introduce TerminalGuard with Drop-based cleanup that fires on every exit path: normal return, ? error propagation, and panic unwind. The guard also handles partial initialization rollback (e.g. raw mode enabled but alternate screen fails). Remove all process::exit calls from the guarded scope.
Description
No description provided
Languages
Rust
100%