yazi/yazi-macro/src/input.rs
2026-05-09 09:26:07 +08:00

10 lines
266 B
Rust

#[macro_export]
macro_rules! input {
($cx:ident, $cfg:expr) => {{
let (tx, rx) = ::tokio::sync::mpsc::unbounded_channel();
match $crate::act!(input:show, $cx, yazi_widgets::input::InputOpt { cfg: $cfg, tx }) {
Ok(_) => Ok(rx),
Err(e) => Err(e)
}
}};
}