jesseduffield / lazygit

simple terminal UI for git commands
MIT License
47.94k stars 1.72k forks source link

Can I change delay after hitting Escape key? #3669

Closed seven1m closed 2 weeks ago

seven1m commented 2 weeks ago

Topic

I absolutely love Lazygit and have integrated it to my daily workflow. One minor gripe I have is the delay you get between pressing Escape and Lazygit backing out of the current thing.

It feels like it’s about a second. I think it’s this thing: https://superuser.com/questions/1579208/delay-after-hitting-escape

Your thoughts

Is this normal? Is it just my machine? My terminal? I don’t have this when using Neovim (which uses Escape a lot) — only in Lazygit.

Thanks so much for such a wonderful tool! It has absolutely revolutionized how I work with git. ❤️❤️❤️

stefanhaller commented 2 weeks ago

For what it's worth, I don't have this delay. Pressing escape in lazygit is pretty much instantaneous for me.

Looking at the tcell code, it seems lazygit uses a hard-coded 50ms timer for escape detection which is not configurable. So the delay you are seeing must be caused by something else, I'd say.

Did you try different terminal applications?

seven1m commented 2 weeks ago

Thank you for that! Good to know it might just be something on my end.

I see this in iTerm and on Termius on my phone. I will try other terminals and without any dotfiles loaded.

seven1m commented 2 weeks ago

I found one source: tmux's escape-time setting. I bet iTerm has a setting too, which I will check later. I think my problem is solved now. Thank you!