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 `refresh_inline_values` when spanning cross excerpts (#51685)
Lukas Wirth74eb252d7ec3
diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rsindex 2512c362f9c..204011412ec 100644--- a/crates/editor/src/editor.rs+++ b/crates/editor/src/editor.rs@@ -23664,6 +23664,14 @@ impl Editor {editor.buffer.read(cx).buffer(excerpt.buffer_id())})?;+ if current_execution_position+ .text_anchor+ .buffer_id+ .is_some_and(|id| id != buffer.read(cx).remote_id())+ {+ return Some(Task::ready(Ok(Vec::new())));+ }+let range =buffer.read(cx).anchor_before(0)..current_execution_position.text_anchor;