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.

Avoid panic with outline highlight ranges

Julia9a2fd184256e
diff --git a/crates/language2/src/outline.rs b/crates/language2/src/outline.rs
index 4bcbdcd27fa..df1a3c629e7 100644
--- a/crates/language2/src/outline.rs
+++ b/crates/language2/src/outline.rs
@@ -81,6 +81,7 @@ impl<T> Outline<T> {
let mut prev_item_ix = 0;
for mut string_match in matches {
let outline_match = &self.items[string_match.candidate_id];
+ string_match.string = outline_match.text.clone();
if is_path_query {
let prefix_len = self.path_candidate_prefixes[string_match.candidate_id];