mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
fix usize overflow
This commit is contained in:
parent
5584ba4844
commit
a27ccb3ad1
1 changed files with 1 additions and 1 deletions
|
|
@ -84,7 +84,7 @@ impl Folder {
|
|||
self.set_page(false);
|
||||
|
||||
if self.cursor < self.offset + 5 {
|
||||
self.offset = self.offset.saturating_sub(old - self.cursor);
|
||||
self.offset = self.offset.saturating_sub(old.saturating_sub(self.cursor));
|
||||
}
|
||||
|
||||
old != self.cursor
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue