mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
19 lines
373 B
Rust
19 lines
373 B
Rust
use anyhow::Result;
|
|
use yazi_macro::{render, succ};
|
|
use yazi_parser::ArrowOpt;
|
|
use yazi_shared::data::Data;
|
|
use yazi_widgets::Scrollable;
|
|
|
|
use crate::{Actor, Ctx};
|
|
|
|
pub struct Arrow;
|
|
|
|
impl Actor for Arrow {
|
|
type Options = ArrowOpt;
|
|
|
|
const NAME: &str = "arrow";
|
|
|
|
fn act(cx: &mut Ctx, opt: Self::Options) -> Result<Data> {
|
|
succ!(render!(cx.pick.scroll(opt.step)));
|
|
}
|
|
}
|