From 7fe42e860f306225cb6e130117dd1ee78838ff82 Mon Sep 17 00:00:00 2001 From: "gcp-cherry-pick-bot[bot]" <98988430+gcp-cherry-pick-bot[bot]@users.noreply.github.com> Date: Tue, 25 Mar 2025 14:40:42 +0200 Subject: [PATCH] Fix strikethrough and underline in Linux (cherry-pick #27267) (#27380) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cherry-picked Fix strikethrough and underline in Linux (#27267) Follow up to #26827 and #24721, which introduced a bug in Linux. |before|now| |---|---| |![image](https://github.com/user-attachments/assets/6471502d-bf92-4808-ad42-9e0c66569d4f)|!![image](https://github.com/user-attachments/assets/ae45510a-8bc9-4f89-90a0-7496842fecb6)| Release Notes: - N/A Co-authored-by: Jason Lee Co-authored-by: João Marcos Co-authored-by: Jason Lee --- crates/gpui/src/text_system/line.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/gpui/src/text_system/line.rs b/crates/gpui/src/text_system/line.rs index 859485aabeec958105dd6103de37fc1588ea0145..ca2a9e9a728469fc36a571f0b3992451c3ea0349 100644 --- a/crates/gpui/src/text_system/line.rs +++ b/crates/gpui/src/text_system/line.rs @@ -202,7 +202,7 @@ fn paint_line( for (glyph_ix, glyph) in run.glyphs.iter().enumerate() { glyph_origin.x += glyph.position.x - prev_glyph_position.x; - if glyph_ix == 0 { + if glyph_ix == 0 && run_ix == 0 { first_glyph_x = glyph_origin.x; }