`Enter` doesn't work when `Press enter to return to lazygit`
Describe the bug A clear and concise description of what the bug is.
When lazygit prompts Press enter to return to lazygit, but Enter key is not working, I have to hit Esc to return to lazygit.
To Reproduce Steps to reproduce the behavior:
- in lazygit, use
eto modify a unstaged file using your editor - exit the editor
- lazygit prompts
Press enter to return to lazygit, butEnteris not working, I have to hitEsc
There are other scenarios that lazygit Press enter to return to lazygit, and it seems Enter is never working.
Expected behavior A clear and concise description of what you expected to happen.
When lazygit prpmpts Press enter to return to lazygit, Enter should work as expected.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: [e.g. Windows]
Manjaro-Linux - Lazygit Version [e.g. v0.1.45]
0.25.1install fromgo get - The last commit id if you built project from sources (run :
git-rev parse HEAD)
Additional context Add any other context about the problem here.
I believe this is caused by a lazygit panic occurring earlier in your terminal session. When this happens, certain codes aren't sent to the terminal on exit which causes problems the next time you run lazygit. I haven't really found a good solution to this other than wrapping all goroutines in a panic handler that manually sends those codes, but it's not a full solution
I can confirm when I bind lazygit in fish or bash to a key, and start lazygit using the binding, the problem occurs, but when I start lazygit normally by typing the command in shell prompt, Enter works without problem.
I mentioned the fish/bash binding problem when I'm using ranger too.https://github.com/ranger/ranger/issues/2287
I don't know what is the root cause since
- Since the problem happens for binding in both bash and fish
- ranger is written in Python, lazygit is written Go, they both have this problem.
it seem fish don't know the key binding run a long fg program
in my fish key binding
bind \cg 'commandline -r lazygit; commandline -f execute'
it works well
In my case, launching lazygit from nvim, I often do :q to exit by mistake and I get stuck there. Esc won't work either.
~~I tried to pass config to disable execute shell binding but whatever I do, it won't work either (likely a problem with lazygit-nvim plugin).~~
Edit: Nevermind, it was my nvim lazy git config that was wrong. Keybinding works properly.
working normally on v0.50.0