Skip to content

fix: render hint labels and correct match column offsets#1674

Open
bigboss2063 wants to merge 2 commits into
raphamorim:mainfrom
bigboss2063:fix/hint-labels-not-rendered
Open

fix: render hint labels and correct match column offsets#1674
bigboss2063 wants to merge 2 commits into
raphamorim:mainfrom
bigboss2063:fix/hint-labels-not-rendered

Conversation

@bigboss2063

Copy link
Copy Markdown

Issue #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.

Fix result (using the same configuration as in the issue)

Before:
image

After:
image
image

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.
@bigboss2063 bigboss2063 force-pushed the fix/hint-labels-not-rendered branch from fb00ea3 to c574bee Compare June 24, 2026 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant