Skip to content

[Windows] [Wezterm] Delay for Esc action #6006

Closed

Description

@driuba

Describe the bug

After v0.65.0 update there is a second or so delay between pressing escape key and exiting from whatever section was opened. If escape is pressed multiple times within this delay window, the action is ignored completely. This does not happen on previous versions (v0.64.1 tested during reporting).

To Reproduce

Steps to reproduce the behavior:

  1. Go to Local branches or Commits;
  2. Press enter on a branch or commit;
  3. Try to exit the view by pressing Esc;
  4. There's a delay before action happening;
    a. Pressing Esc multiple times doesn't exit the view a all.

Expected behavior

There should be no delay, besides reasonable input handling one. Pressing Esc multiple times should exit nested views.

Version info:

commit=c07f4d381b90419583b7ce04f87379654d983ebc, build date=2026-09-05T15:07:13Z, build source=binaryRelease, version=0.65.0, os=linux, arch=amd64, git version=2.55.0

Terminal info:

Windows 11 running WSL Ubuntu:

OS:

Edition	Windows 11 Pro
Version	24H2
Installed on	‎2026-‎02-‎17
OS build	26100.9168
Experience	Windows Feature Experience Pack 1000.26100.344.0

WSL:

PS > wsl --version
WSL version: 2.7.13.0
Kernel version: 6.18.33.2-2
WSLg version: 1.0.73.2
MSRDC version: 1.2.7214
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26100.1-240331-1435.ge-release
Windows version: 10.0.26100.9168

Ubuntu:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 24.04.5 LTS
Release:        24.04
Codename:       noble

Wezterm:

wezterm --version
wezterm 20260622-120102-6ff54928

Additional context

The problem seems only specific to Wezterm and v0.65.0 version combination. It doesn't happen on Windows terminal or previous lazygit versions.

Activity

  1. appenzellergeller commented on Sep 8, 2026

    @appenzellergeller

    I have the same bug on native linux (cachyos) on KDE using Konsole.

    ❯ lazygit --version
    commit=v0.65.0, build date=2026-09-07T11:29:47Z, build source=binaryRelease, version=0.65.0, os=linux, arch=amd64, git version=2.55.0
    
    ❯ konsole --version
    konsole 26.08.0
    
    ❯ fish --version
    fish, version 4.9.2

    I first thought ESC was not working at all, thanks to your issue found out it is only delayed.

  2. stefanhaller commented on Sep 8, 2026

    @stefanhaller
    Collaborator

    This is a regression in the tcell library that we use. It has already been reported upstream, and I linked this issue there; see gdamore/tcell#1169.

  3. driuba commented on Sep 8, 2026

    @driuba
    Author

    Can we expect a patch to revert tcell version change? Or are we gonna wait for upstream fix?

  4. mauroporras commented on Sep 11, 2026

    @mauroporras

    Same thing happening on macOS Tahoe 26.6.2 + Ghostty 1.3.1

    Thanks.

  5. stefanhaller commented on Sep 11, 2026

    @stefanhaller
    Collaborator

    @mauroporras I'm surprised by that; I don't have this problem with the exact same versions of macOS and Ghostty.

    Anyway, can those who are affected by the problem please test the branch wip-bump-tcell in this repo? I confirmed that it fixes it for me with WezTerm on Mac. (Akthough I could imagine that pressing is Esc is still a tiny little bit slower than with 0.64, but it's hard to be sure.)

  6. driuba commented on Sep 11, 2026

    @driuba
    Author

    I'll probably have an opportunity to test it no sooner than tuesday.

  7. BadAcronym commented on Sep 11, 2026

    @BadAcronym

    On linux (also wezterm), it's much better on wip-bump-tcell, although the response still seems delayed to me (an extra ~50ms compared to 0.64.1).

  8. appenzellergeller commented on Sep 11, 2026

    @appenzellergeller

    Can confirm, on wip-bump-tcell its definitely better (and I would say usable) again on linux in konsole.

    But, also, it is definitely not as snappy as it was with 0.64.1. There the ESC action triggered immediately on keydown, now with the fix it is a definitely a bit delayed.

  9. mauroporras commented on Sep 11, 2026

    @mauroporras

    @stefanhaller, I should have mentioned that I use the Ctrl + [ combination, just like in Vim. Normal Esc key works as expected. My bad.

  10. stefanhaller commented on Sep 11, 2026

    @stefanhaller
    Collaborator

    @stefanhaller, I should have mentioned that I use the Ctrl + [ combination, just like in Vim. Normal Esc key works as expected.

    @mauroporras I'm very confused; normally ctrl+[ shouldn't work the same as Esc with a Terminal that supports modern keyboard protocols (like Ghostty). And it doesn't for me. You'd have to explicitly map it in the lazygit config with something like

    keybinding:
      universal:
        return: [<esc>, '<ctrl+[>']

    Did you do that? But if I do, it is still very fast.

  11. mauroporras commented on Sep 11, 2026

    @mauroporras

    @stefanhaller, I have this config on my config.ghostty file:

    # Esc
    keybind = ctrl+[=text:\x1B
    
  12. stefanhaller commented on Sep 11, 2026

    @stefanhaller
    Collaborator

    @mauroporras I see; I can reproduce it with that. And the fix in wip-bump-tcell makes it a lot faster again, but not quite as fast as it was before 0.65.

  13. mauroporras commented on Sep 11, 2026

    @mauroporras

    @stefanhaller, I just tested myself and wip-bump-tcell works for me too and such short delay is not a show stopper for me. Thanks for everything.

  14. stefanhaller commented on Sep 11, 2026

    @stefanhaller
    Collaborator

    Ok, this should fix it for real: #6011. Please test this, I'd like to release this tomorrow.

  15. mauroporras commented on Sep 11, 2026

    @mauroporras

    @stefanhaller, branch bump-tcell works perfectly for me. Thanks.

  16. stefanhaller commented on Sep 13, 2026

    @stefanhaller
    Collaborator

    Closed by #6011.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions