From 7d1ce34da2a47376402e80f3da1533cc3d80120e Mon Sep 17 00:00:00 2001 From: "zed-zippy[bot]" <234243425+zed-zippy[bot]@users.noreply.github.com> Date: Mon, 16 Mar 2026 16:40:36 +0000 Subject: [PATCH] editor: Fix panic in `refresh_inline_values` when spanning cross excerpts (#51685) (cherry-pick to preview) (#51686) Cherry-pick of #51685 to preview ---- Fixes ZED-5VQ Release Notes: - N/A *or* Added/Fixed/Improved ... Co-authored-by: Lukas Wirth --- crates/editor/src/editor.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs index a08ac3bbc466d159ce81a7aa3bebf82599914a0b..11910e6765c6f3b912e049c05d6ce6f458316d7c 100644 --- a/crates/editor/src/editor.rs +++ b/crates/editor/src/editor.rs @@ -24067,6 +24067,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;