Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Foreground selection color not respected in picker preview #12405

Open
joshbainbridge opened this issue Jan 4, 2025 · 0 comments
Open

Foreground selection color not respected in picker preview #12405

joshbainbridge opened this issue Jan 4, 2025 · 0 comments
Labels
C-bug Category: This is a bug

Comments

@joshbainbridge
Copy link
Contributor

joshbainbridge commented Jan 4, 2025

Summary

When using the base16_default theme which sets both a foreground and a background color for "ui.selection", I noticed a difference in behavior between selection highlighting in the buffer window and the picker preview.

The buffer window will respect the foreground color, while the picker preview will not. Here are a couple of examples with a basic test theme to illustrate the issue on both 24.07 and 25.01:

Screenshot 2025-01-04 at 17 25 26 Screenshot 2025-01-04 at 17 23 27

Notice the string text has a foreground of black in the buffer window where the text is selected, overriding the green theme for strings. While in the picker preview the text remains green and the black foreground override for selection is not applied.

Hope that is clear, and apologies if this has already been reported elsewhere. If you would like any further details let me know. The motivation for fixing this is that the selected text can become hard to read in the picker in specific cases.

Reproduction Steps

I tried this:

  1. hx test.toml
  2. :theme test
  3. jx space /selection

I expected this to happen:

The foreground color of the string text selected in the picker preview to be black as set by "ui.selection".

Instead, this happened:

The foreground color of the string text selected in the picker preview was green as set by "string".

Helix log

~/.cache/helix/helix.log

Platform

macOS

Terminal Emulator

Ghostty 1.0.1

Installation Method

nixpkgs / release page

Helix Version

helix 24.07 / helix 25.01

@joshbainbridge joshbainbridge added the C-bug Category: This is a bug label Jan 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug
Projects
None yet
Development

No branches or pull requests

1 participant