Skip to content

Terminal + Neovim: FocusLost/Gained events don't fire. #11682

@mikatpt

Description

@mikatpt

Windows Terminal version (or Windows build number)

1.12.2931.0

Other Software

Neovim 0.5+

Steps to reproduce

Steps to reproduce:

  1. Run Neovim 0.5 or higher using the following min.vim file, with the command nvim -u min.vim --clean
" min.vim
autocmd FocusLost * echo "Focus Lost"
autocmd FocusGained * echo "Focus Gained"
  1. Click away from terminal. Click to.
  2. Vim command line output at the bottom of the screen should update with the echoed text.

Expected Behavior

See title and steps to reproduce. This works in all Linux/MacOS terminals I've used, including Alacritty, Kitty, and iTerm2, as well as in tmux sessions if focus-events are enabled.

The Vim/Neovim release is not particularly important unless you would also like to test in tmux; in that case, choose a release any time after April 2021 and put set -g focus-events on in your .tmux.conf

Actual Behavior

Nothing happens.

Metadata

Metadata

Assignees

Labels

Area-InputRelated to input processing (key presses, mouse, etc.)Area-VTVirtual Terminal sequence supportIssue-TaskIt's a feature request, but it doesn't really need a major design.Product-ConhostFor issues in the Console codebaseProduct-ConptyFor console issues specifically related to conptyProduct-TerminalThe new Windows Terminal.Resolution-Fix-CommittedFix is checked in, but it might be 3-4 weeks until a release.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions