Skip to content

Commit

Permalink
fix: fixed issue where the list would scroll even if all items fit on…
Browse files Browse the repository at this point in the history
… the screen
  • Loading branch information
BrookJeynes committed Dec 3, 2024
1 parent 073dc47 commit 5720c52
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build.zig.zon
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.{
.name = "zfe",
.version = "0.6.0",
.version = "0.6.1",
.minimum_zig_version = "0.13.0",

.dependencies = .{
Expand Down
2 changes: 1 addition & 1 deletion src/list.zig
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ pub fn List(comptime T: type) type {
if (self.selected + 1 < self.len()) {
self.selected += 1;

if (self.all()[self.offset..].len != win_height and self.selected >= self.offset + (win_height / 2)) {
if (self.all()[self.offset..].len > win_height and self.selected >= self.offset + (win_height / 2)) {
self.offset += 1;
}
}
Expand Down

0 comments on commit 5720c52

Please sign in to comment.