Skip to content

Commit

Permalink
fix: wrong file list offset squeeze when scrolloff = 0 (#1866)
Browse files Browse the repository at this point in the history
  • Loading branch information
aidancz authored Oct 31, 2024
1 parent c668723 commit e3c9111
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion yazi-fs/src/folder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ impl Folder {
self.offset = if self.cursor < (self.offset + limit).min(len).saturating_sub(scrolloff) {
len.saturating_sub(limit).min(self.offset)
} else {
len.saturating_sub(limit).min(self.cursor.saturating_sub(limit) + scrolloff)
len.saturating_sub(limit).min(self.cursor.saturating_sub(limit) + 1 + scrolloff)
};

old != self.offset
Expand Down

0 comments on commit e3c9111

Please sign in to comment.