fix(history): preserve mode during navigation

This commit is contained in:
OliverGuy 2026-05-07 23:25:50 +02:00
parent 473415300d
commit 77b091aa57

View file

@ -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
}