wez / wezterm

A GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust
https://wezfurlong.org/wezterm/
Other
17.88k stars 801 forks source link

multiplexer: hyperlinks don't work for wrapped lines #3987

Closed suo closed 1 year ago

suo commented 1 year ago

What Operating System(s) are you seeing this problem on?

macOS

Which Wayland compositor or X11 Window manager(s) are you using?

No response

WezTerm version

wezterm 20230712-141508-4924fd51

Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?

Yes, and I updated the version box above to show the version of the nightly that I tried

Describe the bug

Multi-line implicit hyperlinks do not work (only the part of the URL on the first line is treated as a link). This was reported in https://github.com/wez/wezterm/issues/408 and it looks like a fix was made (closing the issue) but then backed out. Unfortunately, that issue is locked and I can't reopen it, so I'm making a duplicate.

To Reproduce

No response

Configuration

no config

Expected Behavior

No response

Logs

No response

Anything else?

No response

wez commented 1 year ago

Please provide more information on how to trigger this; pointing to a closed issue from 2 years ago doesn't help me reproduce what you are seeing today.

suo commented 1 year ago

Sure, sorry about that. If I have a link that is wrapped by the terminal to be on multiple lines, e.g.

url="https://console.developers.google.com/apis/api/phot
oslibrary.html"

Then only the first line (https://console.developers.google.com/apis/api/phot) will be treated as hyperlink. Ideally, the terminal would know that the full URL spans across multiple lines and clicking will go to the full URL (https://console.developers.google.com/apis/api/photoslibrary.html)

wez commented 1 year ago

It works for me when the terminal wraps it; see the underline in the screenshot here; that's from hovering over the link:

image

if you output two separate lines then we won't match it; hyperlink rules are applied to individual logical (pre-wrapped) lines only.

The logical line aspect was what was fixed in #408; prior to that we only considered the post-wrapped physical lines.

suo commented 1 year ago

Ah, it seems that things only don't work if you are using the multiplexing feature:

image

When I open a regular terminal window, the multi-line behavior matches yours.

wez commented 1 year ago

Duplicate of https://github.com/wez/wezterm/issues/3459

github-actions[bot] commented 1 year ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.