# gpui: Fix background for WrappedLine \(\#27980\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/501b539286db74f011126b12ce5d325ff9914d2e)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 501b539286db74f011126b12ce5d325ff9914d2e

Requested commit: 501b539286db74f011126b12ce5d325ff9914d2e

Commit: 501b539286db74f011126b12ce5d325ff9914d2e

Tree: e79fcc0c99c2285ee9cb3f65a6b81eff514c1c42

Author: Smit Barmase

Committer: GitHub

## Message

```
gpui: Fix background for WrappedLine (#27980)

https://github.com/zed-industries/zed/pull/26454 In this PR, we
separated painting for text line into two parts: `paint` and
`paint_background`. This allows selections to appear in front of the
text background but behind the text itself in the editor.

The `paint_background` method was implemented for `ShapedLine` but not
for `WrappedLine`. This PR adds that, fixing the background rendering
for inline code blocks in Markdown, as they use `WrappedLine`.

Before:
<img width="160" alt="image"
src="https://github.com/user-attachments/assets/81466c63-6835-4128-ba22-1b63f5fd7b1f"
/>

After:
<img width="160" alt="image"
src="https://github.com/user-attachments/assets/3b7044d7-265b-45db-904c-3b70fdf421fe"
/>

Release Notes:

- Fixed missing background for inline code blocks in the editor hover
tooltip.
```

## Parents

- [444b7b8acb229dfb245c946a0ed167ca5ab7ccfa](https://git.cafe/gitcafe/zed/commit/444b7b8acb229dfb245c946a0ed167ca5ab7ccfa?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/501b539286db74f011126b12ce5d325ff9914d2e?format=markdown)
