mirror of
https://github.com/FliegendeWurst/cursive.git
synced 2024-11-27 19:26:09 +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) {
|
pub fn remove_item(&mut self, id: usize) {
|
||||||
self.items.remove(id);
|
self.items.remove(id);
|
||||||
let focus = self.focus();
|
let focus = self.focus();
|
||||||
if focus > id {
|
if focus >= id {
|
||||||
self.focus.set(focus - 1);
|
self.focus.set(focus - 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user