diff --git a/crates/gpui/src/text_system/line.rs b/crates/gpui/src/text_system/line.rs index ee351c342a00d9873478e04067866dd7f78d9f0b..3813393d81deaff4ed9adb1d96e204b75953233f 100644 --- a/crates/gpui/src/text_system/line.rs +++ b/crates/gpui/src/text_system/line.rs @@ -482,6 +482,16 @@ fn paint_line_background( background_origin.x = origin.x; background_origin.y += line_height; } + + glyph_origin.x = aligned_origin_x( + origin, + align_width.unwrap_or(layout.width), + glyph.position.x, + &align, + layout, + wraps.peek(), + ); + glyph_origin.y += line_height; } prev_glyph_position = glyph.position;