From d1cabef2bfbe37bea8415d6b32835be9ed108249 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Tue, 19 Aug 2025 18:53:45 +0200 Subject: [PATCH] editor: Fix inline diagnostics min column inaccuracy (#36501) Closes https://github.com/zed-industries/zed/issues/33346 Release Notes: - Fixed `diagnostic.inline.min_column` being inaccurate --- crates/editor/src/element.rs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/crates/editor/src/element.rs b/crates/editor/src/element.rs index 0922752e44..d8fe3ccf15 100644 --- a/crates/editor/src/element.rs +++ b/crates/editor/src/element.rs @@ -2173,11 +2173,13 @@ impl EditorElement { }; let padding = ProjectSettings::get_global(cx).diagnostics.inline.padding as f32 * em_width; - let min_x = ProjectSettings::get_global(cx) - .diagnostics - .inline - .min_column as f32 - * em_width; + let min_x = self.column_pixels( + ProjectSettings::get_global(cx) + .diagnostics + .inline + .min_column as usize, + window, + ); let mut elements = HashMap::default(); for (row, mut diagnostics) in diagnostics_by_rows {