mirror of
https://github.com/FliegendeWurst/cursive.git
synced 2024-11-23 17:35:00 +00:00
Ignore keys properly in SelectView::on_event
on_event consumes all keypresses by trying to jump to the item that matches the char. Even if no such item is found, the key event is lost to the rest of the application. By returning EventResult::Ignored when the key press has no effect, the key event that have no effect on the SelectView can still be used by somebody else.
This commit is contained in:
parent
e988b984a2
commit
c92b1acb6e
@ -437,6 +437,8 @@ impl<T: 'static> SelectView<T> {
|
||||
// Apply modulo in case we have a hit
|
||||
// from the chained iterator
|
||||
self.focus.set(i % self.items.len());
|
||||
} else {
|
||||
return EventResult::Ignored;
|
||||
}
|
||||
}
|
||||
_ => return EventResult::Ignored,
|
||||
|
Loading…
Reference in New Issue
Block a user