diff --git a/src/bin/tui/table.rs b/src/bin/tui/table.rs index a3a01de08..a165d3d7e 100644 --- a/src/bin/tui/table.rs +++ b/src/bin/tui/table.rs @@ -502,7 +502,7 @@ impl + PartialEq, H: Eq + Hash + Copy + Clone + 'static> Tab /// Returns the index of the currently selected item within the underlying /// storage vector. pub fn item(&self) -> Option { - if self.items.is_empty() || self.focus > self.rows_to_items.len() { + if self.items.is_empty() || self.focus >= self.rows_to_items.len() { None } else { Some(self.rows_to_items[self.focus])