cmderdev / cmder

Lovely console emulator package for Windows
https://cmder.app
MIT License
25.86k stars 2.03k forks source link

[Bug] cmder gets stuck on git reflog #2902

Closed Marco-Sulla closed 8 months ago

Marco-Sulla commented 10 months ago

Version Information

Cmder version: 230724 x64 stable
Operating system: Windows 11 22H2

Cmder Edition

Cmder Full (with Git)

Description of the issue

cmder can't quit git reflog. This happens also to other less-like commands.

How to reproduce

  1. run git reflog
  2. press q

Actual behaviour: cmder does not exit the reflog. It gets stuck, and you have to restart the console.

Additional context

No response

Checklist

DRSDavidSoft commented 10 months ago

Can you please share a recording of this behavior, and the behavior of plain ConEmu or conhost.exe?

If you are certain you can narrow it down to less, please use a command like cat longfile.txt | less instead of git reflog to produce the issue for tests.

Additionally, please run Cmder without ConEmu and attempt to repro the issue: https://github.com/cmderdev/cmder/wiki/Cmder's-shell-in-other-terminals

Marco-Sulla commented 10 months ago

The problem is different in ConEmu. In ConEmu, git log stucks and git reflog prints the output under the console, and it also stucks.

On cmder, git log works. git reflog shows as expected but does not quit.

cat file | less works. The problem arise with some git less-like commands.

I'll try to run Cmder without ConEmu.

Marco-Sulla commented 10 months ago

Additionally, please run Cmder without ConEmu and attempt to repro the issue: https://github.com/cmderdev/cmder/wiki/Cmder's-shell-in-other-terminals

I run it and the problem still remains. After q is pressed, the control is not returned to the console and the console is stucked; I have to close it and relaunch.

DRSDavidSoft commented 10 months ago

@Marco-Sulla Can you also please test Cmder's PowerShell profile? Thanks

Marco-Sulla commented 10 months ago

git integration in the prompt is much slower, but git reflog work as expected in a cmder's powershell console.

chrisant996 commented 10 months ago

@Marco-Sulla I wonder if you might be running into a variation of the MSYS issue described in #2670 and https://github.com/Maximus5/ConEmu/issues/2520.

Some things to try:

The issue is most likely a problem either in ConEmu or in git for Windows (or more specifically, the MSYS library used by git for Windows).

Marco-Sulla commented 9 months ago
  • Does the problem go away if you disable ConEmuHk injection?
  • If you run locale.exe in a different tab in ConEmu, does that un-stick the tab that got stuck?

How can I do that?

Notice anyway that the behavior of the issue under ConEmu and cmder is different.

chrisant996 commented 9 months ago

disable conemuhk injection

Also ConEmu issue 1510 describes the same kind of hanging in git and suggests that turning off conemuhk injection may help.

And one of the comments there says that another issue suggested turning off "long console output" resolves the hang (and has a screen shot for how to do so).

Marco-Sulla commented 8 months ago

I can't reproduce it anymore. WFM.