diff --git a/src/views/select_view.rs b/src/views/select_view.rs index 1509f2d..99d70ed 100644 --- a/src/views/select_view.rs +++ b/src/views/select_view.rs @@ -199,7 +199,7 @@ impl SelectView { pub fn remove_item(&mut self, id: usize) { self.items.remove(id); let focus = self.focus(); - if focus >= id { + if focus >= id && focus > 0 { self.focus.set(focus - 1); } }