yazi/yazi-core/src/input/commands/undo.rs
2024-01-31 08:59:47 +08:00

15 lines
254 B
Rust

use yazi_shared::{event::Cmd, render};
use crate::input::{Input, InputMode};
impl Input {
pub fn undo(&mut self, _: Cmd) {
if !self.snaps.undo() {
return;
}
if self.snap().mode == InputMode::Insert {
self.escape(());
}
render!();
}
}