Fix offset in SelectView::remove_item

This commit is contained in:
Alexandre Bury 2016-08-31 17:14:37 -07:00
parent eca389ed97
commit 6dd81faa57

View File

@ -199,7 +199,7 @@ impl<T: 'static> SelectView<T> {
pub fn remove_item(&mut self, id: usize) {
self.items.remove(id);
let focus = self.focus();
if focus > id {
if focus >= id {
self.focus.set(focus - 1);
}
}