diff --git a/local/recipes/system/redbear-power/source/src/main.rs b/local/recipes/system/redbear-power/source/src/main.rs index 991a3e5956..9061b63a3d 100644 --- a/local/recipes/system/redbear-power/source/src/main.rs +++ b/local/recipes/system/redbear-power/source/src/main.rs @@ -237,15 +237,13 @@ fn handle_mouse(me: MouseEvent, header: &Rect, table: &Rect, keybar: &Rect, app: fn main() -> io::Result<()> { let args = parse_args(); - // v1.44: Restore terminal on panic so the user isn't left with - // a garbled screen in raw mode. + // Let panic unwind so the raw-mode / alternate-screen guards drop + // and restore the terminal before the default panic handler prints. panic::set_hook(Box::new(|info| { - let _ = termion::raw::IntoRawMode::into_raw_mode(std::io::stdout()); let _ = std::io::Write::write_all( &mut std::io::stderr(), format!("redbear-power: {info}\n").as_bytes(), ); - std::process::exit(1); })); let cfg = if let Some(p) = args.config_path.as_ref() {