From 2835c9a972a082a4818ced141465f184d355049e Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Thu, 18 Jan 2024 10:40:43 -0700 Subject: [PATCH] Don't send follower events from other panes Co-Authored-By: Mikayla --- crates/workspace/src/item.rs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/crates/workspace/src/item.rs b/crates/workspace/src/item.rs index 79742ee7322f4e760217fdee2af69256ca9edc82..908ea1d168c22fcfbeeb0417bd40baec9f0ae1c9 100644 --- a/crates/workspace/src/item.rs +++ b/crates/workspace/src/item.rs @@ -448,11 +448,13 @@ impl ItemHandle for View { workspace.unfollow(&pane, cx); } - if item.add_event_to_update_proto( - event, - &mut *pending_update.borrow_mut(), - cx, - ) && !pending_update_scheduled.load(Ordering::SeqCst) + if item.focus_handle(cx).contains_focused(cx) + && item.add_event_to_update_proto( + event, + &mut *pending_update.borrow_mut(), + cx, + ) + && !pending_update_scheduled.load(Ordering::SeqCst) { pending_update_scheduled.store(true, Ordering::SeqCst); cx.defer({