agent_ui: Fix text pasting no longer working (#42914)

Regressed in https://github.com/zed-industries/zed/pull/42908
Release Notes:

- N/A *or* Added/Fixed/Improved ...
This commit is contained in:
Lukas Wirth
2025-11-17 21:04:50 +00:00
committed by GitHub
parent f015368586
commit 3f25d36b3c
+4 -2
View File
@@ -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 {