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 deleting an empty line after a deleted hunk (#24255)
Cole Miller5a955e208ce5
diff --git a/crates/editor/src/display_map.rs b/crates/editor/src/display_map.rsindex 538ec3d3b7a..4e3a7e64604 100644--- a/crates/editor/src/display_map.rs+++ b/crates/editor/src/display_map.rs@@ -1142,12 +1142,7 @@ impl DisplaySnapshot {}pub fn line_indent_for_buffer_row(&self, buffer_row: MultiBufferRow) -> LineIndent {- let (buffer, range) = self- .buffer_snapshot- .buffer_line_for_row(buffer_row)- .unwrap();-- buffer.line_indent_for_row(range.start.row)+ self.buffer_snapshot.line_indent_for_row(buffer_row)}pub fn line_len(&self, row: DisplayRow) -> u32 {