URL highlight broken when URL ends at the EOL #21532

Closed
opened 2026-01-31 07:47:24 +00:00 by claunia · 3 comments
Owner

Originally created by @bestis on GitHub (Apr 16, 2024).

Originally assigned to: @lhecker on GitHub.

Windows Terminal version

1.19.10821.0

Windows build number

10.0.22631.3447

Other Software

No response

Steps to reproduce

  • Open Ubuntu terminal
  • Set your terminal to X cols
  • Run these echo's so that the amount of spaces make the middle one end in the EOL
echo 'https://developer.mozilla.org/en-US/docs/Web/CSS/letter-spacing'
echo '                 https://developer.mozilla.org/en-US/docs/Web/CSS/letter-spacing'
echo '                  https://developer.mozilla.org/en-US/docs/Web/CSS/letter-spacing'
  • Open Windows Powershell

  • Run similar echos

  • Open Command Prompt

  • Run similar echos without the quotes.

Expected Behavior

All the links open the right webpage.

Actual Behavior

  • Ubuntu, the middle link looses the last letter.
    image
  • Powershell, the middle link gets extra PS in the end.
    image
  • Command prompt, middle link looses the last letter
    image
Originally created by @bestis on GitHub (Apr 16, 2024). Originally assigned to: @lhecker on GitHub. ### Windows Terminal version 1.19.10821.0 ### Windows build number 10.0.22631.3447 ### Other Software _No response_ ### Steps to reproduce - Open Ubuntu terminal - Set your terminal to X cols - Run these echo's so that the amount of spaces make the middle one end in the EOL ``` echo 'https://developer.mozilla.org/en-US/docs/Web/CSS/letter-spacing' echo ' https://developer.mozilla.org/en-US/docs/Web/CSS/letter-spacing' echo ' https://developer.mozilla.org/en-US/docs/Web/CSS/letter-spacing' ``` - Open Windows Powershell - Run similar echos - Open Command Prompt - Run similar echos without the quotes. ### Expected Behavior All the links open the right webpage. ### Actual Behavior - Ubuntu, the middle link looses the last letter. ![image](https://github.com/microsoft/terminal/assets/1753286/06d67ebd-a2ea-4826-bb73-0cbf6059c472) - Powershell, the middle link gets extra PS in the end. ![image](https://github.com/microsoft/terminal/assets/1753286/3aff4ac5-f770-49dc-b908-9d6a6379a211) - Command prompt, middle link looses the last letter ![image](https://github.com/microsoft/terminal/assets/1753286/aed85484-1f68-4c73-8d23-02ecaffdcad8)
claunia added the Area-OutputIssue-BugPriority-3Needs-Tag-FixProduct-Terminal labels 2026-01-31 07:47:25 +00:00
Author
Owner

@github-actions[bot] commented on GitHub (Apr 16, 2024):

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@github-actions[bot] commented on GitHub (Apr 16, 2024): Hi I'm an AI powered bot that finds similar issues based off the issue title. Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you! ### Closed similar issues: - [URL highlight issues with emoji (#11797)](https://github.com/microsoft/terminal/issues/11797), similarity score: 0.79 > Note: You can give me feedback by thumbs upping or thumbs downing this comment.
Author
Owner

@bestis commented on GitHub (Apr 16, 2024):

My example has no emoji, wide-characters, etc. So doesn't seem related to me.

@bestis commented on GitHub (Apr 16, 2024): My example has no emoji, wide-characters, etc. So doesn't seem related to me.
Author
Owner

@lhecker commented on GitHub (Apr 17, 2024):

This likely occurs because the UTextAdapter.cpp code doesn't insert newlines between rows. This only becomes apparent when there's a newline at the exact end of the row because then there's no separator between the match (URL) and the remaining text.

@lhecker commented on GitHub (Apr 17, 2024): This likely occurs because the `UTextAdapter.cpp` code doesn't insert newlines between rows. This only becomes apparent when there's a newline at the exact end of the row because then there's no separator between the match (URL) and the remaining text.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#21532