From a7b932178c67f6d9d8abe9c3ef0ff9c8dc802138 Mon Sep 17 00:00:00 2001 From: "zed-zippy[bot]" <234243425+zed-zippy[bot]@users.noreply.github.com> Date: Tue, 17 Mar 2026 09:47:14 +0000 Subject: [PATCH] editor: Fix panic in `refresh_inline_values` when spanning cross excerpts (#51685) (cherry-pick to stable) (#51687) Cherry-pick of #51685 to stable ---- 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 5dd51898914015662a5b5eb0fa20cd3db7fb3380..119494e301bf81ae6fd2fc1894c5802a303df5a1 100644 --- a/crates/editor/src/editor.rs +++ b/crates/editor/src/editor.rs @@ -23994,6 +23994,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;