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

search match highlighting wrong when whitespaces are to be matched, too. #966

Closed
christianparpart opened this issue Jan 2, 2023 · 0 comments · Fixed by #1113
Closed
Labels
bug Something isn't working VT: rasterizer Rendering of the terminal into a pixmap using `terminal_renderer` library

Comments

@christianparpart
Copy link
Member

Example search term

Setting render target size

This string contains 3 whitespace characters. And this is the number the match is highlighted too far to the left,
becuase when a match is considered found, we currently simple walk N cells to the left and start recoloring,
even though we did not take whitespace cells into account.

Example output

image

How to fix

we can't simply recolor, because we also want the whitespace (empty) cells to be colorized, too.
But since they don't exist in the output buffer, we probably need to have a customized codepath not optimizing whitespaces away too much when search terms (/matches) are to be highlighted, in order to get proper highlighting on whitespaces as well as starting on the correct cell.

@christianparpart christianparpart added bug Something isn't working VT: rasterizer Rendering of the terminal into a pixmap using `terminal_renderer` library labels Jan 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working VT: rasterizer Rendering of the terminal into a pixmap using `terminal_renderer` library
Projects
None yet
1 participant