Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #5961
I originally assumed that this was a regression introduced by #5420 (which it technically is). In that PR the picker highlight was changed to be rendered in the background (behin text) instead of in the forground. This was mostly an oversight, because rendering in the background is the default with the new line decoration API.
However upon investigating further I found this to be consistent with other similar highlights like:
The only thing that is really rendered in the foreground is the selection (which uses the syntax highlighting API). All of this is for good reason because otherwise these overlays would hide the cursor/selection. Therefore I think its more consistent to keep the same behavior for the picker highlight too.
While the cursor is not a concern here I think it would be weird to handle the picker highlight differently than all these other highlights. In particular because the DAP frame uses the exact same highlight key (at-least right now) and was always rendered in the background even before #5420. I think that any foreground styling for text should only be handled by the syntax highlighting (and avoided if possible). Similarly any
bg
styling for text should be avoided. The cause of #5961 was that monokai definied abg
color forui.text
(identical toui.background
) which overwrote the background color fromui.highlight
. This also causes similar issues with bufferline/column and the DAP frame. All this PR does is remove thebg
color fromui.text
in monokai.I belive the long term solution for the problem is to:
fg
color.bg
color.