diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs index c68f6c8b4fc976dd1ffb1a7d13e2f6e92dbe99a5..8ea913f9a149ae7819ae7ccae04a65da045c614c 100644 --- a/crates/editor/src/editor.rs +++ b/crates/editor/src/editor.rs @@ -6180,6 +6180,7 @@ impl Editor { ) -> Option { let color = Color::Muted; let position = breakpoint.as_ref().map(|(anchor, _)| *anchor); + let show_tooltip = !self.context_menu_visible(); if self.available_code_actions.is_some() { Some( @@ -6188,19 +6189,21 @@ impl Editor { .icon_size(IconSize::XSmall) .icon_color(color) .toggle_state(is_active) - .tooltip({ - let focus_handle = self.focus_handle.clone(); - move |window, cx| { - Tooltip::for_action_in( - "Toggle Code Actions", - &ToggleCodeActions { - deployed_from_indicator: None, - }, - &focus_handle, - window, - cx, - ) - } + .when(show_tooltip, |this| { + this.tooltip({ + let focus_handle = self.focus_handle.clone(); + move |window, cx| { + Tooltip::for_action_in( + "Toggle Code Actions", + &ToggleCodeActions { + deployed_from_indicator: None, + }, + &focus_handle, + window, + cx, + ) + } + }) }) .on_click(cx.listener(move |editor, _e, window, cx| { window.focus(&editor.focus_handle(cx));