From e19a19eee539b9b62dc62766cc6fe709e3c0d755 Mon Sep 17 00:00:00 2001 From: sxyazi Date: Fri, 10 Nov 2023 09:24:32 +0800 Subject: [PATCH] .. --- yazi-fm/src/executor.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/yazi-fm/src/executor.rs b/yazi-fm/src/executor.rs index 54a7a8c7..0277d193 100644 --- a/yazi-fm/src/executor.rs +++ b/yazi-fm/src/executor.rs @@ -95,7 +95,6 @@ impl<'a> Executor<'a> { // Navigation on!(ACTIVE, arrow); - // on!(T, peek); on!(ACTIVE, leave); on!(ACTIVE, enter); on!(ACTIVE, back); @@ -137,6 +136,11 @@ impl<'a> Executor<'a> { on!(TABS, swap); match exec.cmd.as_bytes() { + b"peek" => { + let step = exec.args.first().and_then(|s| s.parse().ok()).unwrap_or(0); + self.cx.manager.active_mut().preview.arrow(step); + self.cx.manager.peek(true, self.cx.image_layer()) + } // Tasks b"tasks_show" => self.cx.tasks.toggle(()), // Help