Skip to content

Fix URL hint matching and OSC 8 rule handling - #1903

Open
AdamsGH wants to merge 2 commits into
raphamorim:mainfrom
AdamsGH:fix/hint-url-matching
Open

AdamsGH wants to merge 2 commits into
raphamorim:mainfrom
AdamsGH:fix/hint-url-matching

Conversation

@AdamsGH

@AdamsGH AdamsGH commented Aug 27, 2026

Copy link
Copy Markdown

What changed

  • Keep the configured hint rule for OSC 8 hyperlinks instead of replacing it with a synthetic Open rule.
  • Apply the rule regex and post-processing setting to the hyperlink URI.
  • Treat empty grid cells as whitespace during regex matching, so patterns such as [^\s]+ stop at the visible end of the line.

Why

OSC 8 hyperlinks currently bypass the configured rule action when clicked. Regex hint matching can also consume terminal padding because empty cells contain \0, which is not whitespace. Together these bugs produce the wrong action or match text for custom URL and path rules.

Testing

  • cargo fmt --all -- --check
  • cargo test -p rioterm --features wgpu
  • Manually tested on Windows for several days with URL and path hint rules

This branch has not been deployed

No deployments
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