Update tui/src/state.rs

Co-authored-by: Liam <33645555+lj3954@users.noreply.github.com>
This commit is contained in:
Nyx 2024-10-02 03:04:49 -04:00 committed by GitHub
parent 882c8c4b24
commit e3ed8bfa5a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -772,9 +772,6 @@ impl AppState {
fn scroll_tab_up(&mut self) { fn scroll_tab_up(&mut self) {
let len = self.tabs.len(); let len = self.tabs.len();
if len == 0 {
return;
}
let current = self.current_tab.selected().unwrap_or(0); let current = self.current_tab.selected().unwrap_or(0);
let next = if current == 0 { len - 1 } else { current - 1 }; let next = if current == 0 { len - 1 } else { current - 1 };
self.current_tab.select(Some(next)); self.current_tab.select(Some(next));