Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Make context pills clickable while editing (#29740)
Richard Feldmanad87c545c779
diff --git a/crates/agent/src/ui/context_pill.rs b/crates/agent/src/ui/context_pill.rsindex 27c9f3a6f19..49303344f3a 100644--- a/crates/agent/src/ui/context_pill.rs+++ b/crates/agent/src/ui/context_pill.rs@@ -216,9 +216,10 @@ impl RenderOnce for ContextPill {}).when_some(on_click.as_ref(), |element, on_click| {let on_click = on_click.clone();- element- .cursor_pointer()- .on_click(move |event, window, cx| on_click(event, window, cx))+ element.cursor_pointer().on_click(move |event, window, cx| {+ on_click(event, window, cx);+ cx.stop_propagation();+ })}).into_any_element()}@@ -254,7 +255,10 @@ impl RenderOnce for ContextPill {}).when_some(on_click.as_ref(), |element, on_click| {let on_click = on_click.clone();- element.on_click(move |event, window, cx| on_click(event, window, cx))+ element.on_click(move |event, window, cx| {+ on_click(event, window, cx);+ cx.stop_propagation();+ })}).into_any(),}