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

Closed
opened 2026-01-31 07:10:48 +00:00 by claunia · 4 comments
Owner

Originally created by @teh-hippo on GitHub (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.

Originally created by @teh-hippo on GitHub (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` 1. Add configuration to Windows Terminal: ```json { "commandline": "C:\\Program Files\\Git\\bin\\bash.exe", "guid": "{cdd03cd7-3ad2-4b3a-9ce2-2d7f109cce58}", "hidden": false, "name": "Git Bash" }, ``` 1. Confirm font face for Git Bash is 'Cascadia Mono'. 1. Run the terminal. 1. `echo $TERM` -> should return `xterm-256color`. 1. _(Optional)_ `PS1='issue-terminal: '` 1. Paste the character [U+276F](https://unicode.scarfboy.com/?s=U%2b276F): ❯ 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](https://github.com/microsoft/terminal/assets/490309/50c8da16-d06f-4360-853d-1092a408fd43) 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](https://github.com/microsoft/terminal/assets/490309/383426df-9984-49ab-8baa-1127c91be1c9) ### Other Notes I have tried several other terminal emulators and they seem to work as expected.
claunia added the Needs-TriageIssue-BugNeeds-Attention labels 2026-01-31 07:10:48 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Aug 7, 2023):

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 commented on GitHub (Aug 7, 2023): 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.
Author
Owner

@zadjii-msft commented on GitHub (Aug 7, 2023):

This one! https://github.com/microsoft/terminal/issues/14982#issuecomment-1615291201

Can you confirm what LANG is set to?

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

@zadjii-msft commented on GitHub (Aug 7, 2023): This one! https://github.com/microsoft/terminal/issues/14982#issuecomment-1615291201 Can you confirm what `LANG` is set to? Does changing the `commandline` to `bash -l -i` fix this/?
Author
Owner

@teh-hippo commented on GitHub (Aug 8, 2023):

: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. 👍

@teh-hippo commented on GitHub (Aug 8, 2023): :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. 👍
Author
Owner

@teh-hippo commented on GitHub (Aug 8, 2023):

@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!

@teh-hippo commented on GitHub (Aug 8, 2023): @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 in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#20339