Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Focus reporting in terminal windows #8704

Open
blueyed opened this issue Jul 7, 2018 · 4 comments
Open

Focus reporting in terminal windows #8704

blueyed opened this issue Jul 7, 2018 · 4 comments
Labels
enhancement feature request terminal built-in :terminal or :shell

Comments

@blueyed
Copy link
Contributor

blueyed commented Jul 7, 2018

Neovim does not appear to forward focus reporting into :terminal windows.

After printf '\e[?1004h'; cat - you should see ^[[O and ^[[I when your terminal emulator supports focus reporting, and focus moves out/in.

When using :term this does not work anymore.

Since Neovim gets notified about it, it should forward it to the current terminal window (if any).

Additionally it should send focus-in/-out codes when entering/leaving a terminal window - similar to how tmux triggers it when moving in/out of a pane (with the focus-events option).
This should only happen if focus reporting was requested, of course.

(mentioned in #8696 (comment) already, but taking it out from there into a separate issue)

@justinmk justinmk added the terminal built-in :terminal or :shell label Jul 7, 2018
@zeertzjq zeertzjq added the enhancement feature request label Jul 28, 2023
@zeertzjq zeertzjq added this to the 0.10 milestone Aug 4, 2023
@zeertzjq
Copy link
Member

zeertzjq commented Aug 4, 2023

Additionally it should send focus-in/-out codes when entering/leaving a terminal window - similar to how tmux triggers it when moving in/out of a pane (with the focus-events option).

This part may need discussion, because a terminal buffer can be shown in multiple windows or be hidden.

@justinmk
Copy link
Member

justinmk commented Aug 4, 2023

But only one window can be focused. I don't see a problem.

@zeertzjq
Copy link
Member

zeertzjq commented Aug 16, 2023

Related: Vim patch 8.2.3761, although it doesn't report focus when switching buffer.

@zeertzjq zeertzjq removed this from the 0.10 milestone Aug 16, 2023
@xzbdmw
Copy link

xzbdmw commented Jun 20, 2024

I'm running lazygit inside builtin terminal and notice this problem, are there any workaround to manually send focus event to terminal?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement feature request terminal built-in :terminal or :shell
Projects
None yet
Development

No branches or pull requests

4 participants