mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
fix: adjust snap offset calculation in move command
This commit is contained in:
parent
574ee27993
commit
73d90db51d
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue