gpui: Fix markdown wrapped background not correctly rendering (#29571)

Closes #29532

Fixes case where the markdown background was not rendering correctly.
This regression was introduced in
https://github.com/zed-industries/zed/pull/26454.

<img
src="https://github.com/user-attachments/assets/1e64930f-c98e-4042-a20e-46eed03293d6"
alt="image" width="400" />


Release Notes:

- Fixed an issue where markdown code blocks did not wrap correctly.
This commit is contained in:
Smit Barmase 2025-04-29 04:48:24 +05:30 committed by GitHub
parent 2139219832
commit 5102c4c002
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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;