Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Don't send follower events from other panes

Conrad Irwin2835c9a972a0
diff --git a/crates/workspace/src/item.rs b/crates/workspace/src/item.rs
index 79742ee7322..908ea1d168c 100644
--- a/crates/workspace/src/item.rs
+++ b/crates/workspace/src/item.rs
@@ -448,11 +448,13 @@ impl<T: Item> ItemHandle for View<T> {
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({