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.

Fix panic when painting blocks

Antonio Scandurra08dfcba68a73
diff --git a/crates/editor2/src/element.rs b/crates/editor2/src/element.rs
index eaaa2d2a2f5..4d9a516f2b1 100644
--- a/crates/editor2/src/element.rs
+++ b/crates/editor2/src/element.rs
@@ -2464,7 +2464,9 @@ impl Element<Editor> for EditorElement {
self.paint_text(text_bounds, &mut layout, editor, cx);
if !layout.blocks.is_empty() {
- self.paint_blocks(bounds, &mut layout, editor, cx);
+ cx.with_element_id(Some("editor_blocks"), |cx| {
+ self.paint_blocks(bounds, &mut layout, editor, cx);
+ })
}
});
});