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

OSC8 Hyperlink Support #1928

Merged
merged 58 commits into from
Jul 7, 2024
Merged

OSC8 Hyperlink Support #1928

merged 58 commits into from
Jul 7, 2024

Conversation

mitchellh
Copy link
Contributor

@mitchellh mitchellh commented Jul 7, 2024

Fixes #1197

This adds support for OSC8 Hyperlinks.

This PR is primarily focused on the core functionality. The links behave almost identically to #968: i.e. the underline only shows up on hover + ctrl/command. I think we can improve this behavior for OSC8 specifically in the future because the nature of OSC8 is that the TUI program wants it to be a link.

Since the URL is not obvious on a hyperlink, this PR also modifies the GUI to add a visual element to show the hovered URL. This behavior has been added to normal regex URLs too.

CleanShot.2024-07-07.at.09.46.01.2.mp4

cc @rockorager @gpanders who were particularly interested in this.

mitchellh added 30 commits July 5, 2024 21:39
This enables these funcs to access memory offsets that may be present in
set items, which is possible since the set itself is in an offset-based
structure.
@jcollie
Copy link
Collaborator

jcollie commented Jul 7, 2024

GTK: URL overlay moves when mouse cursor moves over it, but URL under the mouse cursor is not detected.

Screencast.from.2024-07-07.13-36-37.webm

@mitchellh
Copy link
Contributor Author

GTK: URL overlay moves when mouse cursor moves over it, but URL under the mouse cursor is not detected.

Thanks, fixed.

explicit: Offset(u8).Slice,

/// No ID was provided so we auto-generate the ID based on an
/// incrementing counter attached to the screen.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Decrementing 😉

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It increments!

@mitchellh mitchellh merged commit 2ecb8e4 into main Jul 7, 2024
34 checks passed
@mitchellh mitchellh deleted the osc8 branch July 7, 2024 20:58
@jcollie jcollie mentioned this pull request Jul 19, 2024
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.

OSC 8 Support
3 participants