fix: render hint labels and correct match column offsets#1674
Open
bigboss2063 wants to merge 2 commits into
Open
fix: render hint labels and correct match column offsets#1674bigboss2063 wants to merge 2 commits into
bigboss2063 wants to merge 2 commits into
Conversation
Issue raphamorim#1668: hint labels not showing up - Wire hint_labels through PanelFrame into build_row_bg (paints hint_background on labeled cells) and build_row_fg (new emit_hint_label_glyphs phase shapes each label char as a one-cell run and overlays it in hint_foreground, drawn last so it replaces the underlying matched text). The configured hint_foreground / hint_background colors were defined but read by no renderer. Byte-offset-as-column drift on lines with non-ASCII cells - find_regex_matches and find_regex_match_at_point converted oniguruma byte offsets to column indices via char count. The previous Column(byte) drifted matches rightward on lines containing non-ASCII cells (e.g. nerd-font PUA icons from oh-my-posh prompts), breaking highlight/label placement and mouse-hover hit-testing. Copy/Command actions still worked because they use the text field, not the Pos. Stale hint_labels during search - update_hint_state now clears hint_labels whenever hint mode is inactive (not only when search is also inactive); previously leftover labels could be drawn over search results once the label renderer was wired in.
fb00ea3 to
c574bee
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Issue #1668: hint labels not showing up
Byte-offset-as-column drift on lines with non-ASCII cells
Stale hint_labels during search
Fix result (using the same configuration as in the issue)
Before:

After:

