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.

editor: Limit target names in hover links multibuffer titles (#36207)

Lukas Wirthe2ce787c0510
diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs
index 1f350cf0d0a..a9780ed6c27 100644
--- a/crates/editor/src/editor.rs
+++ b/crates/editor/src/editor.rs
@@ -15879,6 +15879,8 @@ impl Editor {
.text_for_range(location.range.clone())
.collect::<String>()
})
+ .unique()
+ .take(3)
.join(", ");
format!("{tab_kind} for {target}")
})
@@ -16085,6 +16087,8 @@ impl Editor {
.text_for_range(location.range.clone())
.collect::<String>()
})
+ .unique()
+ .take(3)
.join(", ");
let title = format!("References to {target}");
Self::open_locations_in_multibuffer(