mirror of
https://github.com/FliegendeWurst/cursive.git
synced 2024-11-09 19:00:46 +00:00
Fix offset in SelectView::remove_item
This commit is contained in:
parent
eca389ed97
commit
6dd81faa57
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user