Skip to content
Source
Sign inSign up
pingdotgg/t3code

[Bug]: Unable to exit nvim in terminal drawer using escape key #6362

Closedtomjn(GitHub profile, opens in a new tab) opened this issue 6 comments

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/desktop

Steps to reproduce

  1. Open a terminal drawer and use vim to open a file.
  2. press escape to enter command mode so that you can type q and exit
  3. it did not exit, vim never entered command mode
  4. Repeat steps 1 and 2 in cmux, this time it works

Expected behavior

I expected the escape key to send vim into command mode so that I could exit

Actual behavior

the escape is swallowed and vim does not enter command mode, and I'm unable to exit. I have to close the terminal.

Note this also means it's not possible to save changes to a file in vim from a t3code terminal pane

Impact

Major degradation or frequent failure

Version or commit

0.0.34-nightly.20260812.1077 (b73232bdd31e)

Environment

MacOS 26.5

Logs or stack traces

Screenshots, recordings, or supporting files

Image

Notice the q appears in the bottom right:

Image

In CMUX this is what it looks like:

Image

and if I press escape then :q in cmux:

Image

T3Code never reaches this point and is unable to enter command mode in nvim

Workaround

No response

  1. tomjn(GitHub profile, opens in a new tab) added labelsbug

  2. tomjn(GitHub profile, opens in a new tab) added labelsneeds-triage

  3. tomjn(GitHub profile, opens in a new tab) changed the title

  4. Opened a fix in https://github.com/pingdotgg/t3code/pull/7203.

    Bare Escape is forwarded to the PTY while the terminal drawer has focus, so vim/nvim can leave insert mode. The drawer still closes with mod+w. Escape continues to dismiss the command palette and other overlays when those are actually open.

  5. This and many similar little nuisances when using the terminal could be fixed if there was a setting similar to terminal.integrated.commandsToSkipShell in VSCode that forwards all key strokes to PTY while the terminal is in focus.

  6. I have rebound escape to caps look, and for me if I press the old escape key I can change mode in NeoVim, but my rebound key does not work. There is also a problem with using keyboards shortcuts such as ctrl-d, ctrl-n etc...

  7. I have rebound escape to caps look, and for me if I press the old escape key I can change mode in NeoVim, but my rebound key does not work. There is also a problem with using keyboards shortcuts such as ctrl-d, ctrl-n etc...

    Agreed the default binding of ctrl-d to "split the terminal" is bananas given that key combo in Linux and MacOS terminals signals "end of input" and closes the terminal.

  8. juliusmarminge added labelsneeds more info

  9. juliusmarminge added labelsneeds-julius

  10. this is fixed for me in current beta releases

  11. Note

    🤖 Claude Opus 5.5 responding on behalf of Theo

    Thanks for the report. This is fixed in current main. The maintainer confirmed Escape worked in current code and the reporter later confirmed the issue is fixed in current beta releases. Please test on the nightly built from main on 2026-10-21, or on the next stable release. If the problem still occurs there, please open a new issue that links to this one, with your version and steps to reproduce it.

  12. juliusmarminge removed labelsneeds more info

Sign in to join this conversation.