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.

workspace: Add copy button to ErrorMessagePrompt popup (#48107)

Dawid Harat431c623eb70e
diff --git a/crates/workspace/src/notifications.rs b/crates/workspace/src/notifications.rs
index 8480d127670..10437743df3 100644
--- a/crates/workspace/src/notifications.rs
+++ b/crates/workspace/src/notifications.rs
@@ -519,8 +519,17 @@ impl Render for ErrorMessagePrompt {
}),
)
.child(
- ui::IconButton::new("close", ui::IconName::Close)
- .on_click(cx.listener(|_, _, _, cx| cx.emit(DismissEvent))),
+ h_flex()
+ .gap_1()
+ .child(
+ CopyButton::new("copy-error-message", self.message.clone())
+ .tooltip_label("Copy Error Message"),
+ )
+ .child(
+ ui::IconButton::new("close", ui::IconName::Close).on_click(
+ cx.listener(|_, _, _, cx| cx.emit(DismissEvent)),
+ ),
+ ),
),
)
.child(