From 77b091aa57a150fd42ffe91bcab28cd71a9a37c8 Mon Sep 17 00:00:00 2001 From: OliverGuy Date: Thu, 7 May 2026 23:25:50 +0200 Subject: [PATCH] fix(history): preserve mode during navigation --- yazi-widgets/src/input/history.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/yazi-widgets/src/input/history.rs b/yazi-widgets/src/input/history.rs index 8d5ed6a7..7926649a 100644 --- a/yazi-widgets/src/input/history.rs +++ b/yazi-widgets/src/input/history.rs @@ -68,6 +68,11 @@ impl InputHistory { self.entry_snaps[new_idx].take().unwrap() }; + // Preserve mode from before navigation + let snap = snaps.current_mut(); + snap.cursor = snap.cursor.min(snap.count().saturating_sub(mode.delta())); + snap.mode = mode; + true }