Commit d7ffc37
authored
editor: Improve text color in document color highlight (#39372)
Release Notes:
- Improved text color in LSP document color highlight.
----
Because highlight ranges are implemented using a paint background,
there's no way to control the text color.
I've been thinking about this problem for a long time, want to solve it.
~~Today, I come up with a new idea. Re-rendering the document color text
at the top should solve this problem.~~
#### Update 10/6:
> The previous version is not good, when we have soft wrap text, that
version will not work correct.
Now use exists `bg_segments_per_row` feature to fix text color.
## Before
<img width="563" height="540" alt="image"
src="https://github.com/user-attachments/assets/99722253-0cab-4d2a-a5d1-7f28393bcaed"
/>
## After
<img width="544" height="527" alt="image"
src="https://github.com/user-attachments/assets/a1bf6cdb-0e9c-435d-b14a-6ee9159a63d9"
/>1 parent b798376 commit d7ffc37
1 file changed
+11
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8931 | 8931 | | |
8932 | 8932 | | |
8933 | 8933 | | |
| 8934 | + | |
| 8935 | + | |
| 8936 | + | |
| 8937 | + | |
| 8938 | + | |
| 8939 | + | |
| 8940 | + | |
| 8941 | + | |
| 8942 | + | |
| 8943 | + | |
8934 | 8944 | | |
8935 | 8945 | | |
8936 | 8946 | | |
8937 | | - | |
| 8947 | + | |
8938 | 8948 | | |
8939 | 8949 | | |
8940 | 8950 | | |
| |||
0 commit comments