mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
fix(history): preserve mode during navigation
This commit is contained in:
parent
473415300d
commit
77b091aa57
1 changed files with 5 additions and 0 deletions
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue