Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
editor: Fix panic in `render_edit_prediction_cursor_popover` (#55604)
Lukas Wirth62a1e89f7bac
diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rsindex c1741cd6215..a05876d2d9c 100644--- a/crates/editor/src/editor.rs+++ b/crates/editor/src/editor.rs@@ -9066,8 +9066,13 @@ impl Editor {}invalidation_row_range =move_invalidation_row_range.unwrap_or(edit_start_row..edit_end_row);- let target = first_edit_start;- EditPrediction::MoveWithin { target, snapshot }++ let (_, snapshot) = multibuffer.anchor_to_buffer_anchor(first_edit_start)?;++ EditPrediction::MoveWithin {+ target: first_edit_start,+ snapshot: snapshot.clone(),+ }} else {let show_completions_in_menu = self.has_visible_completions_menu();let show_completions_in_buffer = !self.edit_prediction_visible_in_cursor_popover(true)