diff --git a/yazi-core/src/input/commands/move_.rs b/yazi-core/src/input/commands/move_.rs index 8ff68f0a..441ac127 100644 --- a/yazi-core/src/input/commands/move_.rs +++ b/yazi-core/src/input/commands/move_.rs @@ -39,7 +39,7 @@ impl Input { )); let (limit, snap) = (self.limit(), self.snap_mut()); - if snap.offset + limit / 2 > snap.cursor { + if snap.offset > snap.cursor.saturating_sub(limit / 2) { snap.offset = snap.cursor.saturating_sub(limit / 2); } else if snap.value.is_empty() { snap.offset = 0;