mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 00:31:04 +00:00
26 lines
483 B
Rust
26 lines
483 B
Rust
use anyhow::Result;
|
|
use yazi_macro::{act, succ};
|
|
use yazi_shared::data::Data;
|
|
use yazi_widgets::input::parser::CompleteOpt;
|
|
|
|
use crate::{Actor, Ctx};
|
|
|
|
pub struct Complete;
|
|
|
|
impl Actor for Complete {
|
|
type Form = CompleteOpt;
|
|
|
|
const NAME: &str = "complete";
|
|
|
|
fn act(cx: &mut Ctx, form: Self::Form) -> Result<Data> {
|
|
let Some(mut guard) = cx.input.lock_mut() else {
|
|
succ!();
|
|
};
|
|
|
|
if guard.ticket.current() != form.ticket {
|
|
succ!();
|
|
}
|
|
|
|
act!(complete, guard, form)
|
|
}
|
|
}
|