Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

editor: Fix inline diagnostics min column inaccuracy (#36501)

Lukas Wirthd1cabef2bfbe
diff --git a/crates/editor/src/element.rs b/crates/editor/src/element.rs
index 0922752e44d..d8fe3ccf158 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 {