microsoft / microsoft/terminal
Intermittently unable to exit pager after `git log`
@lhecker is already working on this.
Since Mar 6, 2024.
- Dominant language
- C++
- Stars
- 105k
- Forks
- 9.6k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 29
Description
Windows Terminal version
1.19.240130002
Windows build number
10.0.22631.0
Other Software
No response
Steps to reproduce
- create a git repo
- make about 50 commits so the git log needs to use pager
mkdir winterm-pager-repro; cd winterm-pager-repro; invoke-expression 'git init'; for($i = 0; $i -le 50; $i++) { echo 'abc' >> testfile.txt; invoke-expression 'git add .'; invoke-expression "git commit -m "test commit $i"'; } - run 'git log' on the repo. make sure the pager is invoked and you have an option to enter
qto exit pager and get back to prompt. please try this 10-15 times. this doesnt happen consistently but its happens consistently when tried multiple times. - if reproed, after entering 'q', the ':' at the end of page disappears, cursor continues to blink, but prompt wont be available. you will need to open a new tab or instance to continue.
Expected Behavior
upon hitting 'q', pager should exit and I should be back on the command prompt.
Actual Behavior
upon hitting 'q' to exit pager, command prompt doesn't reappear. only option is to open a new tab/instance.
in the image below, I should be able to hit q and get back to the prompt
when i hit 'q', the terminal gets stuck. there cursor continues to blink (not captured in screenshot below) but terminal doesnt respond to any key press. it is not frozen because i can select text with my mouse, close/open new tabs.
Few things I have tried to isolate the issue:
- ran powershell without my profile and without loading any other module besides ps-readline, the issue still happens
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.