Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
agent_ui: Fix text pasting no longer working (#42914)
Lukas Wirth3f25d36b3c26
diff --git a/crates/agent_ui/src/acp/message_editor.rs b/crates/agent_ui/src/acp/message_editor.rsindex 84896e7a74a..120fdb26b39 100644--- a/crates/agent_ui/src/acp/message_editor.rs+++ b/crates/agent_ui/src/acp/message_editor.rs@@ -916,7 +916,6 @@ impl MessageEditor {let Some(clipboard) = cx.read_from_clipboard() else {return;};- cx.stop_propagation();cx.spawn_in(window, async move |this, cx| {use itertools::Itertools;let (mut images, paths) = clipboard@@ -964,7 +963,10 @@ impl MessageEditor {}let replacement_text = MentionUri::PastedImage.as_link().to_string();- let Ok(editor) = this.update(cx, |this, _| this.editor.clone()) else {+ let Ok(editor) = this.update(cx, |this, cx| {+ cx.stop_propagation();+ this.editor.clone()+ }) else {return;};for image in images {