yazi/yazi-core/src/input/commands/undo.rs
2024-01-02 08:38:26 +08:00

15 lines
257 B
Rust

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