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.

git: Fix panic when folding ranges (#48809)

Cole Miller7390b449f9dc
diff --git a/crates/editor/src/display_map.rs b/crates/editor/src/display_map.rs
index 604d5f97ca2..21c8a15ef19 100644
--- a/crates/editor/src/display_map.rs
+++ b/crates/editor/src/display_map.rs
@@ -758,9 +758,10 @@ impl DisplayMap {
let (snapshot, edits) = self.inlay_map.sync(buffer_snapshot.clone(), edits);
let (mut fold_map, snapshot, edits) = self.fold_map.write(snapshot, edits);
let (snapshot, edits) = self.tab_map.sync(snapshot, edits, tab_size);
- let (_snapshot, _edits) = self
+ let (snapshot, edits) = self
.wrap_map
.update(cx, |map, cx| map.sync(snapshot, edits, cx));
+ self.block_map.read(snapshot, edits, None);
let inline = creases.iter().filter_map(|crease| {
if let Crease::Inline {