Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Liam <[email protected]>
  • Loading branch information
jeevithakannan2 and lj3954 authored Nov 22, 2024
1 parent c8dd5c7 commit c6d3671
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tui/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit c6d3671

Please sign in to comment.