From 3e2f1d733c75e3ea1604ba9750ea51675b93d1c5 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Tue, 29 Oct 2024 09:16:38 -0700 Subject: [PATCH] Fix horizontal scroll caused by diagnostic block width error (#19856) Previously, when scrolling the diagnostics view with the mouse, we'd get a spurious horizontal scroll (even if the content was not overflowing horizontally) due to an error in the widths of the diagnostic blocks. Release Notes: - Fixed an issue where the project diagnostics view spuriously allowed horizontal scrolling by a small amount. --- crates/editor/src/editor.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs index df13f748066a3b98da2b69bf32d262c3aadc625b..81ee6a01defd7e3695658dd9b7f6970d8c3d3465 100644 --- a/crates/editor/src/editor.rs +++ b/crates/editor/src/editor.rs @@ -14188,7 +14188,7 @@ pub fn diagnostic_block_renderer( .relative() .size_full() .pl(cx.gutter_dimensions.width) - .w(cx.max_width + cx.gutter_dimensions.width) + .w(cx.max_width - cx.gutter_dimensions.full_width()) .child( div() .flex()