Ctrl+clicking URLs partially out of viewport not working as expected #22528

Open
opened 2026-01-31 08:15:52 +00:00 by claunia · 4 comments
Owner

Originally created by @JeffreyCA on GitHub (Nov 11, 2024).

Originally assigned to: @carlos-zamora on GitHub.

Windows Terminal version

1.22.2912.0

Windows build number

10.0.22635.4445

Other Software

No response

Steps to reproduce

  1. Open Windows Terminal

  2. Resize Terminal window to a small size

  3. Press 'Enter' key until the active command prompt (with blinking cursor) reaches the last visible row in the window:
    Image

  4. Run a command with a long URL, like: echo 'https://github.com/microsoft/terminal/blob/main/src/cascadia/TerminalCore/lib/terminalcore-lib.vcxproj'

  5. Ensure the URL wraps to span 2 or more lines. If not, resize the window to reduce the width.
    Image

  6. Scroll up one line so that only the first line of the wrapped URL is visible: Image

  7. Ctrl+click the visible part of the URL

Expected Behavior

It should navigate to the full URL (https://github.com/microsoft/terminal/blob/main/src/cascadia/TerminalCore/lib/terminalcore-lib.vcxproj)

Actual Behavior

It navigates to the part of the URL that's visible (https://github.com/microsoft/terminal/bl), which is often invalid

Originally created by @JeffreyCA on GitHub (Nov 11, 2024). Originally assigned to: @carlos-zamora on GitHub. ### Windows Terminal version 1.22.2912.0 ### Windows build number 10.0.22635.4445 ### Other Software _No response_ ### Steps to reproduce 1. Open Windows Terminal 2. Resize Terminal window to a small size 3. Press 'Enter' key until the active command prompt (with blinking cursor) reaches the last visible row in the window: ![Image](https://github.com/user-attachments/assets/a31ca24d-989f-44a4-bbba-7f412dc02c4e) 4. Run a command with a long URL, like: `echo 'https://github.com/microsoft/terminal/blob/main/src/cascadia/TerminalCore/lib/terminalcore-lib.vcxproj'` 5. Ensure the URL wraps to span 2 or more lines. If not, resize the window to reduce the width. ![Image](https://github.com/user-attachments/assets/a72f1bf7-6968-4a59-a3a7-80323603369a) 6. Scroll up one line so that only the first line of the wrapped URL is visible: ![Image](https://github.com/user-attachments/assets/f0a34880-9e9d-4a8e-90c1-21f6fecf0845) 7. Ctrl+click the visible part of the URL ### Expected Behavior It should navigate to the full URL (https://github.com/microsoft/terminal/blob/main/src/cascadia/TerminalCore/lib/terminalcore-lib.vcxproj) ### Actual Behavior It navigates to the part of the URL that's visible (https://github.com/microsoft/terminal/bl), which is often invalid
claunia added the Issue-BugArea-InteractionProduct-Terminal labels 2026-01-31 08:15:52 +00:00
Author
Owner

@similar-issues-ai[bot] commented on GitHub (Nov 11, 2024):

We've found some similar issues:

  • #9089 , similarity score: 81%

If any of the above are duplicates, please consider closing this issue out and adding additional context in the original issue.

Note: You can give me feedback by 👍 or 👎 this comment.

@similar-issues-ai[bot] commented on GitHub (Nov 11, 2024): We've found some similar issues: - #9089 , similarity score: 81% If any of the above are duplicates, please consider closing this issue out and adding additional context in the original issue. > Note: You can give me feedback by 👍 or 👎 this comment.
Author
Owner

@JeffreyCA commented on GitHub (Nov 11, 2024):

This seems to be similar to #9089, but that was closed by the original author without a fix

@JeffreyCA commented on GitHub (Nov 11, 2024): This seems to be similar to #9089, but that was closed by the original author without a fix
Author
Owner

@carlos-zamora commented on GitHub (Nov 20, 2024):

Thanks for filing! I was actually just taking a look at that code earlier. We only look one past the end of the current viewport, so we can just expand on that.

Long-term, we should perform the regex search on hover. The regex system we have is pretty performant so there shouldn't be any performance concerns there.

@carlos-zamora commented on GitHub (Nov 20, 2024): Thanks for filing! I was actually just taking a look at that code earlier. We only look one past the end of the current viewport, so we can just expand on that. Long-term, we should perform the regex search on hover. The regex system we have is pretty performant so there shouldn't be any performance concerns there.
Author
Owner

@SamErde commented on GitHub (Mar 4, 2025):

Should this be listed in #5001 (Scenario: Add support for hyperlinks)?

This is still reproducable in 1.22.x in both PowerShell and Windows PowerShell. A simple way to reproduce is to get any object with a long Uri string that gets wrapped by the console. eg: Find-Module -Name PSFramework | Select-Object Name,Author,Version,Description,*Uri,ReleaseNotes

Image

@SamErde commented on GitHub (Mar 4, 2025): Should this be listed in #5001 [(Scenario: Add support for hyperlinks)](https://github.com/microsoft/terminal/issues/5001)? This is still reproducable in 1.22.x in both PowerShell and Windows PowerShell. A simple way to reproduce is to get any object with a long Uri string that gets wrapped by the console. eg: `Find-Module -Name PSFramework | Select-Object Name,Author,Version,Description,*Uri,ReleaseNotes` ![Image](https://github.com/user-attachments/assets/87430d17-40f6-4914-9456-cbf54c28e708)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#22528