git: Side-by-side search matches panic (#48544)

Cameron Mcloughlin created

Fixes a panic when using a search anchor from one side of a side-by-side
in the
other.

Release Notes:

- N/A *or* Added/Fixed/Improved ...

Change summary

crates/editor/src/split.rs | 2 ++
1 file changed, 2 insertions(+)

Detailed changes

crates/editor/src/split.rs 🔗

@@ -492,6 +492,7 @@ impl SplittableEditor {
                 if let Some(lhs) = &mut this.lhs {
                     if !lhs.was_last_focused {
                         lhs.was_last_focused = true;
+                        cx.emit(SearchEvent::MatchesInvalidated);
                         cx.notify();
                     }
                 }
@@ -504,6 +505,7 @@ impl SplittableEditor {
                 if let Some(lhs) = &mut this.lhs {
                     if lhs.was_last_focused {
                         lhs.was_last_focused = false;
+                        cx.emit(SearchEvent::MatchesInvalidated);
                         cx.notify();
                     }
                 }