Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
editor: Show "Toggle Excerpt Unfold" tooltip when buffer is fold (#43626)
Xiaobo Liufa070c50e57e
diff --git a/crates/editor/src/element.rs b/crates/editor/src/element.rsindex c85528353fc..dab04e86263 100644--- a/crates/editor/src/element.rs+++ b/crates/editor/src/element.rs@@ -3969,9 +3969,14 @@ impl EditorElement {.children(toggle_chevron_icon).tooltip({let focus_handle = focus_handle.clone();+ let is_folded_for_tooltip = is_folded;move |_window, cx| {Tooltip::with_meta_in(- "Toggle Excerpt Fold",+ if is_folded_for_tooltip {+ "Unfold Excerpt"+ } else {+ "Fold Excerpt"+ },Some(&ToggleFold),format!("{} to toggle all",