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

Carat position is lost when using certain unicode characters. #15798

Closed
teh-hippo opened this issue Aug 7, 2023 · 4 comments
Closed

Carat position is lost when using certain unicode characters. #15798

teh-hippo opened this issue Aug 7, 2023 · 4 comments
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Attention The core contributors need to come back around and look at this ASAP. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting

Comments

@teh-hippo
Copy link

teh-hippo commented Aug 7, 2023

Windows Terminal version

1.17.11461.0

Windows build number

Microsoft Windows [Version 10.0.22621.1992]

Other Software

git version 2.41.0.windows.3
GNU bash, version 5.2.15(1)-release (x86_64-pc-msys)

Steps to reproduce

  1. Install Git (for Bash): winget install Git.Git
  2. Add configuration to Windows Terminal:
    {
        "commandline": "C:\\Program Files\\Git\\bin\\bash.exe",
        "guid": "{cdd03cd7-3ad2-4b3a-9ce2-2d7f109cce58}",
        "hidden": false,
        "name": "Git Bash"
    },
  3. Confirm font face for Git Bash is 'Cascadia Mono'.
  4. Run the terminal.
  5. echo $TERM -> should return xterm-256color.
  6. (Optional) PS1='issue-terminal: '
  7. Paste the character U+276F: ❯
    Note: This specific character isn't the issue. Other characters also can cause the issue.

Expected Behavior

Pasting the character multiple time progresses the line as normal:
image

Expected behaviour screenshot was created by launching Git Bash itself, which I believe uses MinTTY.

Actual Behavior

Pasting the character multiple times shifts the carat back 1 space each time.

image

Other Notes

I have tried several other terminal emulators and they seem to work as expected.

@teh-hippo teh-hippo added Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Aug 7, 2023
@zadjii-msft
Copy link
Member

This feels like a LANG / LC_ALL thing we saw kinda recently with git bash. Something about that not being initialized right for certain git bash profiles.

Lemme try digging it up.

@zadjii-msft
Copy link
Member

This one! #14982 (comment)

Can you confirm what LANG is set to?

Does changing the commandline to bash -l -i fix this/?

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Aug 7, 2023
@teh-hippo
Copy link
Author

:O That absolutely did make a difference and seems to have fixed it! Helpful explanation on that linked issue too - so thank you. This has been doing my head in for weeks. 👍

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Aug 7, 2023
@teh-hippo
Copy link
Author

@zadjii-msft - The day is brighter. I can finally use enrichments in Terminal like oh-my-posh without the lines going all awry. Nerd-o-meter is going off. Big thankyou!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Attention The core contributors need to come back around and look at this ASAP. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting
Projects
None yet
Development

No branches or pull requests

2 participants