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.

Add tooltip for code actions icon button (#18461)

Danilo Leal3737d4eb4fa9
diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs
index b604f388deb..d1ca70f705c 100644
--- a/crates/editor/src/editor.rs
+++ b/crates/editor/src/editor.rs
@@ -5368,6 +5368,19 @@ impl Editor {
.icon_size(IconSize::XSmall)
.icon_color(Color::Muted)
.selected(is_active)
+ .tooltip({
+ let focus_handle = self.focus_handle.clone();
+ move |cx| {
+ Tooltip::for_action_in(
+ "Toggle Code Actions",
+ &ToggleCodeActions {
+ deployed_from_indicator: None,
+ },
+ &focus_handle,
+ cx,
+ )
+ }
+ })
.on_click(cx.listener(move |editor, _e, cx| {
editor.focus(cx);
editor.toggle_code_actions(