=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/cmd-select-pane.c,v retrieving revision 1.60 retrieving revision 1.61 diff -c -r1.60 -r1.61 *** src/usr.bin/tmux/cmd-select-pane.c 2020/05/16 15:01:31 1.60 --- src/usr.bin/tmux/cmd-select-pane.c 2020/05/16 16:20:59 1.61 *************** *** 1,4 **** ! /* $OpenBSD: cmd-select-pane.c,v 1.60 2020/05/16 15:01:31 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: cmd-select-pane.c,v 1.61 2020/05/16 16:20:59 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott *************** *** 87,96 **** const struct cmd_entry *entry = cmd_get_entry(self); struct cmd_find_state *current = cmdq_get_current(item); struct cmd_find_state *target = cmdq_get_target(item); struct winlink *wl = target->wl; struct window *w = wl->window; struct session *s = target->s; ! struct window_pane *wp = target->wp, *lastwp, *markedwp; struct options *oo = wp->options; char *title; const char *style; --- 87,97 ---- const struct cmd_entry *entry = cmd_get_entry(self); struct cmd_find_state *current = cmdq_get_current(item); struct cmd_find_state *target = cmdq_get_target(item); + struct client *c = cmdq_get_client(item); struct winlink *wl = target->wl; struct window *w = wl->window; struct session *s = target->s; ! struct window_pane *wp = target->wp, *activewp, *lastwp, *markedwp; struct options *oo = wp->options; char *title; const char *style; *************** *** 201,216 **** return (CMD_RETURN_NORMAL); } ! if (wp == w->active) return (CMD_RETURN_NORMAL); if (window_push_zoom(w, args_has(args, 'Z'))) server_redraw_window(w); window_redraw_active_switch(w, wp); ! if (window_set_active_pane(w, wp, 1)) { cmd_find_from_winlink_pane(current, wl, wp, 0); ! cmdq_insert_hook(s, item, current, "after-select-pane"); ! cmd_select_pane_redraw(w); ! } if (window_pop_zoom(w)) server_redraw_window(w); --- 202,222 ---- return (CMD_RETURN_NORMAL); } ! if (c->session != NULL && (c->flags & CLIENT_ACTIVEPANE)) ! activewp = server_client_get_pane(c); ! else ! activewp = w->active; ! if (wp == activewp) return (CMD_RETURN_NORMAL); if (window_push_zoom(w, args_has(args, 'Z'))) server_redraw_window(w); window_redraw_active_switch(w, wp); ! if (c->session != NULL && (c->flags & CLIENT_ACTIVEPANE)) ! server_client_set_pane(c, wp); ! else if (window_set_active_pane(w, wp, 1)) cmd_find_from_winlink_pane(current, wl, wp, 0); ! cmdq_insert_hook(s, item, current, "after-select-pane"); ! cmd_select_pane_redraw(w); if (window_pop_zoom(w)) server_redraw_window(w);