fix: stop selection from running off the bottom of the recent files list
This commit is contained in:
parent
48fc8a968c
commit
b8261f924e
1 changed files with 1 additions and 1 deletions
|
@ -154,7 +154,7 @@ pub fn State(ctx_type: type) type {
|
|||
self.selected = 0;
|
||||
return;
|
||||
};
|
||||
self.selected = @min(current + 1, self.count() - 1);
|
||||
self.selected = @min(current + 1, self.count() - self.header_count - 1);
|
||||
}
|
||||
|
||||
pub fn select_up(self: *Self) void {
|
||||
|
|
Loading…
Add table
Reference in a new issue