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

console.lua: underline matching parts of selectable items #15749

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

guidocella
Copy link
Contributor

fzy returns which characters matched the search for every item, so use this to highlight them.

Using color is complicated because it will become hard to differentiate depending on --osd-color and color blindless, so just underline the matched parts.

The returned positions are just bytes, so we can't put ASS tags or escape sequences around each byte because that would break displaying multibyte UTF-8 characters. Only put them around sequences of matched positions.

Copy link

github-actions bot commented Jan 26, 2025

Download the artifacts for this pull request:

Windows
macOS

fzy returns which characters matched the search for every item, so use
this to highlight them.

Using color is complicated because it will become hard to differentiate
depending on --osd-color and color blindless, so just underline the
matched parts.

The returned positions are just bytes, so we can't put ASS tags or
escape sequences around each byte because that would break displaying
multibyte UTF-8 characters. Only put them around sequences of matched
positions.
@kasper93
Copy link
Contributor

Could we have an option to control this behavior?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants