mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
22 lines
351 B
Rust
22 lines
351 B
Rust
use anyhow::Result;
|
|
use yazi_macro::succ;
|
|
use yazi_parser::VoidForm;
|
|
use yazi_shared::data::Data;
|
|
|
|
use crate::{Actor, Ctx};
|
|
|
|
pub struct Stop;
|
|
|
|
impl Actor for Stop {
|
|
type Form = VoidForm;
|
|
|
|
const NAME: &str = "stop";
|
|
|
|
fn act(cx: &mut Ctx, _: Self::Form) -> Result<Data> {
|
|
cx.active_mut().preview.reset_image();
|
|
|
|
*cx.term = None;
|
|
|
|
succ!();
|
|
}
|
|
}
|