You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: enable OSC 8 hyperlink clicking with Cmd/Ctrl modifier (#117)
* feat: enable OSC 8 hyperlink clicking with Cmd/Ctrl modifier
Add support for clicking OSC 8 hyperlinks in the terminal. This involves:
1. Add ghostty_terminal_get_hyperlink_uri() to the WASM API to retrieve the
actual URI for cells marked with hyperlinks. The hyperlink_id field is
just a boolean indicator; the real URI is stored in Ghostty's internal
hyperlink set and must be looked up via this new function.
2. Update OSC8LinkProvider to use the new WASM API, with proper coordinate
conversion from buffer rows to viewport rows (accounting for scrollback).
3. Fix LinkDetector to cache links by position range rather than hyperlink_id,
since all hyperlinks incorrectly shared the same ID value (1), causing
multiple links on one line to all open the same URL.
Now Cmd+clicking (Mac) or Ctrl+clicking (Windows/Linux) an OSC 8 hyperlink
correctly opens that specific link's URI.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
* fix: address PR review feedback for OSC 8 hyperlinks
- Add scrollback support so OSC 8 links remain clickable after scrolling
- Retry with larger buffers (2KB/8KB/32KB) for long URIs
- Preserve OSC8 link precedence over regex when ranges overlap
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
0 commit comments