mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-21 23:01:05 +00:00
15 lines
247 B
Rust
15 lines
247 B
Rust
use yazi_tui::Raterm;
|
|
|
|
pub(super) struct Panic;
|
|
|
|
impl Panic {
|
|
pub(super) fn install() {
|
|
better_panic::install();
|
|
|
|
let hook = std::panic::take_hook();
|
|
std::panic::set_hook(Box::new(move |info| {
|
|
Raterm::stop();
|
|
hook(info);
|
|
}));
|
|
}
|
|
}
|