Typed input is sometimes wrongly ordered #22185

Open
opened 2026-01-31 08:05:56 +00:00 by claunia · 5 comments
Owner

Originally created by @Vampire on GitHub (Aug 29, 2024).

Windows Terminal version

1.20.11781.0

Windows build number

10.0.19045.3930

Other Software

Bash from Git for Windows

Steps to reproduce

I cannot tell exactly how to reproduce.
But it happens regularly.
The prompt is not ready yet because it still executes the last command or evaluates the PROMPT_COMMAND of Bash.
Then I already type the next command like git b -a (b here is a Git alias for branch -vv).

Now regularly it happens that once the prompt is ready what is inserted is misordered, like agit b -, so the characters typed later are input before characters typed earlier.

I first thought I just mistyped, but I'm absolutely sure now, that I did not mistype, but the characters were not inserted in the order I typed them.
I guess there is some race condition somewhere that causes this.

Expected Behavior

Input appears in the order I typed it.

Actual Behavior

Input is mixed up.

Originally created by @Vampire on GitHub (Aug 29, 2024). ### Windows Terminal version 1.20.11781.0 ### Windows build number 10.0.19045.3930 ### Other Software Bash from Git for Windows ### Steps to reproduce I cannot tell exactly how to reproduce. But it happens regularly. The prompt is not ready yet because it still executes the last command or evaluates the `PROMPT_COMMAND` of Bash. Then I already type the next command like `git b -a` (`b` here is a Git alias for `branch -vv`). Now regularly it happens that once the prompt is ready what is inserted is misordered, like `agit b -`, so the characters typed later are input before characters typed earlier. I first thought I just mistyped, but I'm absolutely sure now, that I did not mistype, but the characters were not inserted in the order I typed them. I guess there is some race condition somewhere that causes this. ### Expected Behavior Input appears in the order I typed it. ### Actual Behavior Input is mixed up.
claunia added the Area-OutputIssue-BugProduct-Terminal labels 2026-01-31 08:05:56 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Sep 4, 2024):

  • Does this repro outside of Git for Windows?
  • Did this repro on older versions of the Terminal?
  • What version of git for windows / bash/?

Our current hypothesis is that this is something weird that cygwin is doing, but it's hard/impossible for us to investigate without a more consistent repro

@zadjii-msft commented on GitHub (Sep 4, 2024): * Does this repro outside of Git for Windows? * Did this repro on older versions of the Terminal? * What version of git for windows / bash/? Our current hypothesis is that this is something weird that cygwin is doing, but it's hard/impossible for us to investigate without a more consistent repro
Author
Owner

@Vampire commented on GitHub (Sep 5, 2024):

Does this repro outside of Git for Windows?

I almost exclusively use Bash from Git for Windows as shell, so I don't know.

Did this repro on older versions of the Terminal?

I'm not 100% sure, but if it happened, then not that often that I felt like reporting it and I'm usually fast with reporting issues.

What version of git for windows / bash/?

Just updated 2 hours ago to 2.46.0.windows.1, I think it was 2.45.0.windows.1 before.
as I just upgraded it and did not do much work since then, I don't yet know whether it still reproduces.

Our current hypothesis is that this is something weird that cygwin is doing,

That's quite unlikely, as Cygwin is not at all involved. :-D
Git for Windows is MSYS-based, not Cygwin-based. :-)

it's hard/impossible for us to investigate without a more consistent repro

Totally understand that, I'm just not able to provide a better or more reliable reproduction recipe for this. :-(

@Vampire commented on GitHub (Sep 5, 2024): > Does this repro outside of Git for Windows? I almost exclusively use Bash from Git for Windows as shell, so I don't know. > Did this repro on older versions of the Terminal? I'm not 100% sure, but if it happened, then not that often that I felt like reporting it and I'm usually fast with reporting issues. > What version of git for windows / bash/? Just updated 2 hours ago to 2.46.0.windows.1, I think it was 2.45.0.windows.1 before. as I just upgraded it and did not do much work since then, I don't yet know whether it still reproduces. > Our current hypothesis is that this is something weird that cygwin is doing, That's quite unlikely, as Cygwin is not at all involved. :-D Git for Windows is MSYS-based, not Cygwin-based. :-) > it's hard/impossible for us to investigate without a more consistent repro Totally understand that, I'm just not able to provide a better or more reliable reproduction recipe for this. :-(
Author
Owner

@DHowett commented on GitHub (Sep 5, 2024):

Git for Windows is MSYS-based, not Cygwin-based. :-)

Ah, but MSYS is itself Cygwin-based! 🙂

Image

@DHowett commented on GitHub (Sep 5, 2024): > Git for Windows is MSYS-based, not Cygwin-based. :-) Ah, but MSYS is itself Cygwin-based! 🙂 ![Image](https://github.com/user-attachments/assets/69d3fcd5-3317-4303-a7a6-2a9b86fe8db2)
Author
Owner

@Vampire commented on GitHub (Sep 30, 2024):

Ah, sorry, it seems I forgot that msys2 is a Cygwin fork.

Just updated 2 hours ago to 2.46.0.windows.1, I think it was 2.45.0.windows.1 before.
as I just upgraded it and did not do much work since then, I don't yet know whether it still reproduces.

Now I know that it still reproduces.

@Vampire commented on GitHub (Sep 30, 2024): Ah, sorry, it seems I forgot that msys2 is a Cygwin fork. > Just updated 2 hours ago to 2.46.0.windows.1, I think it was 2.45.0.windows.1 before. as I just upgraded it and did not do much work since then, I don't yet know whether it still reproduces. Now I know that it still reproduces.
Author
Owner

@carlos-zamora commented on GitHub (Oct 2, 2024):

Thanks! We think this is an issue with Cygwin, so we'll keep this open for now, but we'll touch base on it later.

@carlos-zamora commented on GitHub (Oct 2, 2024): Thanks! We think this is an issue with Cygwin, so we'll keep this open for now, but we'll touch base on it later.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#22185