From d1928f084e91ccacafaf28eee1ccf5cfef99e6ff Mon Sep 17 00:00:00 2001 From: Thorsten Ball Date: Mon, 15 Apr 2024 18:37:03 +0200 Subject: [PATCH] Remove TODO by defining constant (#10556) Release Notes: - N/A --- crates/editor/src/element.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/editor/src/element.rs b/crates/editor/src/element.rs index 6eb99421a47e6e47d039f2c134ad75c22083eb92..0c22c9dcefaaa4a235927b7998eada28c1afc38e 100644 --- a/crates/editor/src/element.rs +++ b/crates/editor/src/element.rs @@ -1133,11 +1133,12 @@ impl EditorElement { content_origin.y + line_height * (row as f32 - scroll_pixel_position.y / line_height); let start_x = { + const INLINE_BLAME_PADDING_EM_WIDTHS: f32 = 6.; + let line_layout = &line_layouts[(row - start_row) as usize]; let line_width = line_layout.line.width; - // TODO: define the padding as a constant - content_origin.x + line_width + (em_width * 6.) + content_origin.x + line_width + (em_width * INLINE_BLAME_PADDING_EM_WIDTHS) }; let absolute_offset = point(start_x, start_y);