From c998b4a053b2893e15b9d4cbb4ca57faf03e7108 Mon Sep 17 00:00:00 2001 From: Cole Miller Date: Thu, 9 Apr 2026 10:05:40 -0400 Subject: [PATCH] diagnostics: Fall back to `multibuffer_context_lines` when syntactic expansion produces a single-line range (#53526) Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [ ] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Release Notes: - N/A --- crates/diagnostics/src/diagnostics.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/diagnostics/src/diagnostics.rs b/crates/diagnostics/src/diagnostics.rs index dc3708e9307032a43b062289764656fa05b20d46..49e17e69b00c6061c5209c5ad5440c7ea816dd80 100644 --- a/crates/diagnostics/src/diagnostics.rs +++ b/crates/diagnostics/src/diagnostics.rs @@ -989,6 +989,7 @@ async fn context_range_for_entry( cx, ) .await + .filter(|rows| rows.start() != rows.end()) { Range { start: Point::new(*rows.start(), 0),