mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
21 lines
348 B
Rust
21 lines
348 B
Rust
use yazi_config::keymap::Exec;
|
|
|
|
use crate::input::{Input, InputMode};
|
|
|
|
pub struct Opt;
|
|
|
|
impl From<&Exec> for Opt {
|
|
fn from(_: &Exec) -> Self { Self }
|
|
}
|
|
|
|
impl Input {
|
|
pub fn undo(&mut self, _: impl Into<Opt>) -> bool {
|
|
if !self.snaps.undo() {
|
|
return false;
|
|
}
|
|
if self.snap().mode == InputMode::Insert {
|
|
self.escape(());
|
|
}
|
|
true
|
|
}
|
|
}
|