-
Notifications
You must be signed in to change notification settings - Fork 30
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
^[[O and ^[[I being sent to active tmux window, even if not the one with vim running #2
Comments
You're right. I noticed this myself. The problem is that we're telling iTerm2 to report focus when we start Vim, but we really only want it to report focus when that window is the active one. I'm not sure what the best way to fix this is. We really need a way for Vim to get notified when its tmux pane is activated or deactivated. Anyone have any ideas? |
This isn't the solution as there are still problems with it, but you can always ignore those with your inputrc:
The real solution would require tmux to notify the pane when it gained or lost focus: https://sourceforge.net/tracker/index.php?func=detail&aid=3558288&group_id=200378&atid=973265 |
@aaronjensen is correct. If you use Fish like me, you'll need to use
I'll leave this open in case tmux ever implements the notifications. |
Note that this only fixes things in the shell. Once control passes to another program you'll still get the stray characters. The real solution is, as @aaronjensen mentioned, for tmux to allow notification to panes. |
One workaround is to use: let g:vitality_fix_focus=0 You'll lose the FocusLost/FocusGained functionality, however. |
I have a version of tmux that handles this issue. You'll need to bundle it with my version of vitality. |
@akracun awesome. Any chance of this making it into tmux mainline? |
@akracun I'm not seeing focus-filter in |
I'm using this for now:
|
@aaronjensen focus-filter is a window option, use I'll add this option check in to my vitality.vim repository. As for adding this feature to tmux mainline, I'll look into it. |
Good news everyone, it seems the tmux issue/request referenced in this post is now implemented in tmux! |
Say I have 2 tmux windows (0:0 and 0:1) and vim is running in one of them (0:0). I have focused the window that does not have vim running (0:1). If i leave iterm2 the escape sequence ^[[O is sent to window 0:1 and causes a newline to appear after the prompt and rings a bell in iterm2. returning focus to iterm2 also sends the escape sequence ^[[I but no visual disturbance occurs.
The text was updated successfully, but these errors were encountered: