mirror of
https://github.com/tmux/tmux.git
synced 2025-09-07 11:58:17 +00:00
Merge branch 'obsd-master'
This commit is contained in:
@@ -1158,10 +1158,6 @@ server_client_check_focus(struct window_pane *wp)
|
||||
push = wp->flags & PANE_FOCUSPUSH;
|
||||
wp->flags &= ~PANE_FOCUSPUSH;
|
||||
|
||||
/* If we don't care about focus, forget it. */
|
||||
if (!(wp->base.mode & MODE_FOCUSON))
|
||||
return;
|
||||
|
||||
/* If we're not the active pane in our window, we're not focused. */
|
||||
if (wp->window->active != wp)
|
||||
goto not_focused;
|
||||
@@ -1185,14 +1181,20 @@ server_client_check_focus(struct window_pane *wp)
|
||||
}
|
||||
|
||||
not_focused:
|
||||
if (push || (wp->flags & PANE_FOCUSED))
|
||||
bufferevent_write(wp->event, "\033[O", 3);
|
||||
if (push || (wp->flags & PANE_FOCUSED)) {
|
||||
if (wp->base.mode & MODE_FOCUSON)
|
||||
bufferevent_write(wp->event, "\033[O", 3);
|
||||
notify_pane("pane-focus-out", wp);
|
||||
}
|
||||
wp->flags &= ~PANE_FOCUSED;
|
||||
return;
|
||||
|
||||
focused:
|
||||
if (push || !(wp->flags & PANE_FOCUSED))
|
||||
bufferevent_write(wp->event, "\033[I", 3);
|
||||
if (push || !(wp->flags & PANE_FOCUSED)) {
|
||||
if (wp->base.mode & MODE_FOCUSON)
|
||||
bufferevent_write(wp->event, "\033[I", 3);
|
||||
notify_pane("pane-focus-in", wp);
|
||||
}
|
||||
wp->flags |= PANE_FOCUSED;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user