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.

Defer first update active buffer for conversation (#10564)

Kyle Kelley5037f466f6de
diff --git a/crates/assistant/src/assistant_panel.rs b/crates/assistant/src/assistant_panel.rs
index ae789a3f92d..a215fbc8fd7 100644
--- a/crates/assistant/src/assistant_panel.rs
+++ b/crates/assistant/src/assistant_panel.rs
@@ -2065,7 +2065,7 @@ impl ConversationEditor {
workspace: workspace.downgrade(),
_subscriptions,
};
- this.update_active_buffer(workspace, cx);
+ cx.defer(|this, cx| this.update_active_buffer(workspace, cx));
this.update_message_headers(cx);
this
}