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
This commit is contained in:
Lukas Wirth 2025-08-19 18:53:45 +02:00 committed by GitHub
parent 013eaaeadd
commit d1cabef2bf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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 {