mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2024-12-24 12:29:44 +00:00
Apply suggestions from code review
Co-authored-by: Liam <33645555+lj3954@users.noreply.github.com>
This commit is contained in:
parent
c8dd5c779c
commit
c6d3671d57
|
@ -596,13 +596,13 @@ impl AppState {
|
|||
}
|
||||
|
||||
fn scroll_down(&mut self) {
|
||||
let entries = if self.at_root() {
|
||||
let num_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 == entries {
|
||||
if selected == num_entries {
|
||||
self.selection.select_first();
|
||||
} else {
|
||||
self.selection.select_next();
|
||||
|
|
Loading…
Reference in New Issue
Block a user