From 063d512bc81104d166218295625060477167e747 Mon Sep 17 00:00:00 2001 From: Nyx <144965845+nnyyxxxx@users.noreply.github.com> Date: Wed, 2 Oct 2024 03:17:48 -0400 Subject: [PATCH] apply changes proposed by adam Co-authored-by: Adam Perkowski --- tui/src/state.rs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/tui/src/state.rs b/tui/src/state.rs index bbee883e..2554d79f 100644 --- a/tui/src/state.rs +++ b/tui/src/state.rs @@ -512,9 +512,6 @@ impl AppState { fn scroll_down(&mut self) { let len = self.filter.item_list().len(); - if len == 0 { - return; - } let current = self.selection.selected().unwrap_or(0); let max_index = if self.at_root() { len - 1 } else { len }; let next = if current + 1 > max_index { @@ -527,9 +524,6 @@ impl AppState { fn scroll_up(&mut self) { let len = self.filter.item_list().len(); - if len == 0 { - return; - } let current = self.selection.selected().unwrap_or(0); let max_index = if self.at_root() { len - 1 } else { len }; let next = if current == 0 { max_index } else { current - 1 };