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

Intermittently unable to exit pager after git log #16748

Open
karkianish opened this issue Feb 22, 2024 · 4 comments
Open

Intermittently unable to exit pager after git log #16748

karkianish opened this issue Feb 22, 2024 · 4 comments
Assignees
Labels
Area-Input Related to input processing (key presses, mouse, etc.) Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Terminal The new Windows Terminal.
Milestone

Comments

@karkianish
Copy link

karkianish commented Feb 22, 2024

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 q to 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
winterm-cursor-issue-1

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.
image

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
@karkianish karkianish 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 Feb 22, 2024
@carlos-zamora carlos-zamora added Area-Input Related to input processing (key presses, mouse, etc.) Product-Terminal The new Windows Terminal. and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Mar 6, 2024
@carlos-zamora carlos-zamora added this to the Backlog milestone Mar 6, 2024
@zadjii-msft
Copy link
Member

#14288 sounds familiar, but we thought we fixed that a while back. Weird. Are you resizing at all in that process?

@bobomb
Copy link

bobomb commented Apr 16, 2024

I have this issue happen to me often multiple times per day, and it's not just git log, but also git diff when it uses the pager. For the longest time I've suspected it might be a bug with Clink and Terminals used together, but I don't have any evidence to point to it conclusively. If this issue occurs, would a process dump of Terminals and/or Git and the pager (less) have any value to help debug it?

@alberto-ingenito
Copy link

I got same problems. Any update on this?

@dc0sic
Copy link

dc0sic commented Jan 2, 2025

I have the same problem (on Windows 11 Pro). The pager freezes frequently and it does so regardless of whether I use bash (the one that comes with git or the one that's part of VS Code), PowerShell, or Windows command line. So far, I haven't observed this behavior outside of git. For example, less long_file works fine and doesn't hang when it reaches the end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Input Related to input processing (key presses, mouse, etc.) Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Terminal The new Windows Terminal.
Projects
None yet
Development

No branches or pull requests

7 participants