terminal: `[O` erroneously inputted after exiting from Neovim 0.7.0 in latest Terminal Preview

Windows Terminal version

1.14.1451.0

Windows build number

10.0.19044.1706

Other Software

Neovim 0.7.0 (https://github.com/neovim/neovim/releases/tag/v0.7.0)

Steps to reproduce

  1. Install Neovim
  2. Open it by running nvim in your shell (works both in cmd and pwsh)
  3. exit it (:q)

Expected Behavior

Neovim exits, nothing else happens.

Actual Behavior

Neovim exits, and the shell receives [O on its console input.

image

My guess would be that the characters are part of a response to some VT escape code from Neovim, but for some reason they get written separately and the shell gets them instead of Neovim.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 2
  • Comments: 18 (10 by maintainers)

Commits related to this issue

Most upvoted comments

Filed https://github.com/neovim/neovim/issues/18899 for investigation.

Theoretically, we might be able to route input in such a way that focus events from the API don’t hit this path. Ultimately, I am curious why this is being sent in the first place. That might affect the route we want to go in mitigating this.

It looks like there was an issue open on Neovim for something similar: neovim/neovim#17985 That says a fix has been merged in but trying the latest Neovim nightly still has the issue for me in Terminal, so it may not be related.