microsoft / microsoft/terminal

Typed input is sometimes wrongly ordered

Open
#17,825 6 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Area-Output Issue-Bug Product-Terminal
Dominant language
C++
Stars
105k
Forks
9.6k
Avg merge
3d 17h
Merged PRs (30d)
29

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file, test, or entry point is identified. Begin by establishing a reliable reproduction involving Bash from Git for Windows, a still-running command or PROMPT_COMMAND, and typed input; done means input consistently appears in the order it was typed.

Written by the indexing model from the issue text.

Assessment

Tech stack
bash, cpp, git
Domain
cli, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.