mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2024-11-23 13:45:19 +00:00
Fix scroll down not reaching bottom entry
This commit is contained in:
parent
ab7a67087d
commit
c8dd5c779c
|
@ -596,8 +596,13 @@ impl AppState {
|
|||
}
|
||||
|
||||
fn scroll_down(&mut self) {
|
||||
let entries = if self.at_root() {
|
||||
self.filter.item_list().len() - 1
|
||||
} else {
|
||||
self.filter.item_list().len()
|
||||
};
|
||||
if let Some(selected) = self.selection.selected() {
|
||||
if selected == self.filter.item_list().len() - 1 {
|
||||
if selected == entries {
|
||||
self.selection.select_first();
|
||||
} else {
|
||||
self.selection.select_next();
|
||||
|
|
Loading…
Reference in New Issue
Block a user