editor: Show "Toggle Excerpt Unfold" tooltip when buffer is fold (#43626)
Release Notes: - N/A --------- Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com> Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
This commit is contained in:
co-authored by
Danilo Leal
parent
d97d4f3949
commit
fa070c50e5
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user