Character navigation issue #21763

Closed
opened 2026-01-31 07:54:12 +00:00 by claunia · 2 comments
Owner

Originally created by @WillPittenger on GitHub (May 23, 2024).

Windows Terminal version

1.20.11271.0

Windows build number

Win32NT 10.0.22631.0 Microsoft Windows NT 10.0.22631.0

Other Software

PS 7.4.2

Steps to reproduce

Paste in 'R🜨'. Now try to put a period immediately after the closing quotes as though you wanted to call one of the string's members. If you do so by visually placing the caret to the immediate right of the closing quote, you'll actually put the new character in the string.

Expected Behavior

As you move the caret back and forth, you'd think it'd move left or right one character the user sees. The user sees 4 characters in that code, 2 in the string and two quotes.

Actual Behavior

Terminal acts like there are 5 characters. It treats 🜨 as two characters. I'm creating this with FF 126.0 and it handle this situation correctly. In this image, the caret was past the end of the string.

image

Originally created by @WillPittenger on GitHub (May 23, 2024). ### Windows Terminal version 1.20.11271.0 ### Windows build number Win32NT 10.0.22631.0 Microsoft Windows NT 10.0.22631.0 ### Other Software PS 7.4.2 ### Steps to reproduce Paste in `'R🜨'`. Now try to put a period immediately after the closing quotes as though you wanted to call one of the string's members. If you do so by visually placing the caret to the immediate right of the closing quote, you'll actually put the new character *in* the string. ### Expected Behavior As you move the caret back and forth, you'd think it'd move left or right one character the user sees. The user sees 4 characters in that code, 2 in the string and two quotes. ### Actual Behavior Terminal acts like there are 5 characters. It treats `🜨` as two characters. I'm creating this with FF 126.0 and it handle this situation correctly. In this image, the caret was past the end of the string. ![image](https://github.com/microsoft/terminal/assets/5451058/4c0dfdbc-819e-483c-a4ce-25d4d006637f)
claunia added the Needs-TriageIssue-BugResolution-External labels 2026-01-31 07:54:12 +00:00
Author
Owner

@github-actions[bot] commented on GitHub (May 23, 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 (May 23, 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: - [Carat position is lost when using certain unicode characters. (#15798)](https://github.com/microsoft/terminal/issues/15798), similarity score: 0.77 - [some weird behavior when dealing with full-width characters (#14736)](https://github.com/microsoft/terminal/issues/14736), similarity score: 0.76 - [Typing emoji breaks cursor position (#529)](https://github.com/microsoft/terminal/issues/529), similarity score: 0.75 > Note: You can give me feedback by thumbs upping or thumbs downing this comment.
Author
Owner

@lhecker commented on GitHub (May 25, 2024):

Unfortunately, this is a bug in PowerShell, or more specifically in PSReadLine (which is a module in PowerShell that provides the commandline edit experience). If you try your string in a cmd tab for instance, you should notice that it works correctly. I believe this is the most active issue in their repo about this right now: https://github.com/PowerShell/PSReadLine/issues/2358
I've heard internally that they're currently trying to fix this issue, but there's no timeline yet when that may be done (doing it correctly is non-trivial).

@lhecker commented on GitHub (May 25, 2024): Unfortunately, this is a bug in PowerShell, or more specifically in PSReadLine (which is a module in PowerShell that provides the commandline edit experience). If you try your string in a cmd tab for instance, you should notice that it works correctly. I believe this is the most active issue in their repo about this right now: https://github.com/PowerShell/PSReadLine/issues/2358 I've heard internally that they're currently trying to fix this issue, but there's no timeline yet when that may be done (doing it correctly is non-trivial).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#21763