Skip to content

Commit

Permalink
Defer first update active buffer for conversation (#10564)
Browse files Browse the repository at this point in the history
This fixes when the workspace is not actually available for a
`.read(cx)`.

Release Notes:

- Fix a panic when quoting a selection before the assistant panel has
been started

Co-authored-by: Conrad Irwin <conrad@zed.dev>
  • Loading branch information
rgbkrk and ConradIrwin committed Apr 15, 2024
1 parent f28fde5 commit 5037f46
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/assistant/src/assistant_panel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 5037f46

Please sign in to comment.