# editor: Fix text selection not visible on text background \(\#26454\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 41ddd1cc975e06d8a300902010195a6697e2be9b

Requested commit: 41ddd1cc975e06d8a300902010195a6697e2be9b

Commit: 41ddd1cc975e06d8a300902010195a6697e2be9b

Tree: 8a71d6fdd86e13ba3617a97b829ec971fa73393f

Author: Smit Barmase

Committer: GitHub

## Message

```
editor: Fix text selection not visible on text background (#26454)

Closes #25014

Previously, we painted in the order: highlights -> text background ->
text -> etc. This caused text selection to be invisible when the text
had a background.

This PR changes the painting order to: text background -> highlights ->
text -> etc.

Before:


https://github.com/user-attachments/assets/5d9647c4-3ab2-4960-b6b9-e399882a0c50

After:


https://github.com/user-attachments/assets/c699f5b9-4077-45f8-85e5-86c89130eb71

Release Notes:

- Fixed an issue where text selection was not visible on top of a text
background in the editor.
```

## Parents

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

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