Preserve serach index for multicaret selection editor events

This commit is contained in:
Kirill Bulatov 2023-07-14 14:33:26 +03:00
parent c130dd6b47
commit ccc78000bd
6 changed files with 130 additions and 16 deletions

View file

@ -647,7 +647,11 @@ impl SearchableItem for TerminalView {
}
/// Convert events raised by this item into search-relevant events (if applicable)
fn to_search_event(event: &Self::Event) -> Option<SearchEvent> {
fn to_search_event(
&mut self,
event: &Self::Event,
_: &mut ViewContext<Self>,
) -> Option<SearchEvent> {
match event {
Event::Wakeup => Some(SearchEvent::MatchesInvalidated),
Event::SelectionsChanged => Some(SearchEvent::ActiveMatchChanged),