tmux-plugins / vim-tmux-focus-events

Make terminal vim and tmux work better together.
MIT License
348 stars 23 forks source link

FocusGained / FocusLost events sometimes don't fire on mac #16

Open ddickstein opened 6 years ago

ddickstein commented 6 years ago

On Mac OS Sierra in some cases the focus gained / lost events don't fire.

They successfully fire when:

They fail to fire when:

This problem does not seem to occur on Linux.

ddickstein commented 6 years ago

Update: it seems that the "fail to fire" cases actually do fire but it takes several seconds before they do. How can I reduce / eliminate this delay?

MartyLake commented 6 years ago

Did you try this already in you.tmux.conf file ? 

# address vim mode switching delay (http://superuser.com/a/252717/65504)
set -sg escape-time 0
ddickstein commented 6 years ago

Yes

ddickstein commented 6 years ago

I am now experiencing this issue on Linux, so it's probably not OS-specific.

seanedwards commented 5 years ago

@ddickstein Did you ever figure this out? I'm having this issue now, and there is not much information out there about terminal focus events.

Linux+urxvt

If I do echo -ne "\033]777;focus;on\007" && read in the console, I can see my terminal outputting the ^[[O and ^[[I events the moment the terminal gets/loses focus, but for some reason tmux seems to be delaying the actual pane focus hooks for up to several seconds.

I have also added set -sg escape-time 0 in my tmux.conf

I don't actually think this is a vim-tmux-focus-events issue, for what it's worth. Just wondering if you figured anything out since there's precious little information out there about tmux and terminal focus hooks at all. :sweat_smile: