Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
terminal_view: Fix close tab button tooltip showing wrong keybinding on windows (#43981)
Lukas Wirth6a097298b017
diff --git a/crates/workspace/src/pane.rs b/crates/workspace/src/pane.rsindex f149c320a1e..8182a7dd88a 100644--- a/crates/workspace/src/pane.rs+++ b/crates/workspace/src/pane.rs@@ -2724,11 +2724,11 @@ impl Pane {.map(|this| {if is_active {let focus_handle = focus_handle.clone();- this.tooltip(move |_window, cx| {+ this.tooltip(move |window, cx| {Tooltip::for_action_in(end_slot_tooltip_text,end_slot_action,- &focus_handle,+ &window.focused(cx).unwrap_or_else(|| focus_handle.clone()),cx,)})@@ -3031,7 +3031,14 @@ impl Pane {.disabled(!self.can_navigate_backward()).tooltip({let focus_handle = focus_handle.clone();- move |_window, cx| Tooltip::for_action_in("Go Back", &GoBack, &focus_handle, cx)+ move |window, cx| {+ Tooltip::for_action_in(+ "Go Back",+ &GoBack,+ &window.focused(cx).unwrap_or_else(|| focus_handle.clone()),+ cx,+ )+ }});let navigate_forward = IconButton::new("navigate_forward", IconName::ArrowRight)@@ -3047,8 +3054,13 @@ impl Pane {.disabled(!self.can_navigate_forward()).tooltip({let focus_handle = focus_handle.clone();- move |_window, cx| {- Tooltip::for_action_in("Go Forward", &GoForward, &focus_handle, cx)+ move |window, cx| {+ Tooltip::for_action_in(+ "Go Forward",+ &GoForward,+ &window.focused(cx).unwrap_or_else(|| focus_handle.clone()),+ cx,+ )}});