Skip to content

bug: Vim INSERT mode Esc key leak, Enter not sending in NORMAL mode, and mode indicator render lag #4675

Description

@zzhenyao

What happened?

1. Esc key leak in INSERT mode

Pressing Esc to switch from vim INSERT to NORMAL mode also triggers AppContainer's Esc handler:

  • First Esc shows "Press Esc again to clear" prompt
  • Pressing Esc twice clears the input buffer
  • Pressing Esc during model response interrupts the streaming output
Image

2. Enter not sending messages in NORMAL mode

Pressing Enter in NORMAL mode is consumed by the vim handler without triggering message send.

Image

In NORMAL mode, Enter is intercepted by vim but not forwarded. In INSERT mode, Enter sends the message but pressing Esc during output interrupts the streaming response

3. Mode indicator render lag

Switching between INSERT and NORMAL mode has noticeable delay. The -- NORMAL -- indicator does not appear at all, and the -- INSERT -- indicator fails to update immediately.

What did you expect to happen?

Pressing Esc in INSERT mode should only switch vim mode without triggering AppContainer behavior. Pressing Enter in NORMAL mode should send messages the same as non-vim mode. The mode indicator should update instantly with no perceptible delay.

Client information

Client Information

Run qwen to enter the interactive CLI, then run the /about command.

  │ Qwen Code                         0.17.0 (58f57bec2)                                             │
  │ Runtime                           Node.js v22.22.2 / npm 10.9.7                                  │
  │ LSP                               disabled                                                       │
  │ OS                                linux x64 (6.8.0-110-generic)

Login information

N/A

Anything else we need to know?

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    category/uiUser interface and displayscope/interactiveInteractive CLI featuresscope/keybindingsKeyboard shortcuts and bindingsstatus/needs-triageIssue needs to be triaged and labeledtype/bugSomething isn't working as expected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions