=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/cmd-find.c,v retrieving revision 1.64 retrieving revision 1.65 diff -c -r1.64 -r1.65 *** src/usr.bin/tmux/cmd-find.c 2018/05/09 07:50:03 1.64 --- src/usr.bin/tmux/cmd-find.c 2018/05/28 11:50:47 1.65 *************** *** 1,4 **** ! /* $OpenBSD: cmd-find.c,v 1.64 2018/05/09 07:50:03 nicm Exp $ */ /* * Copyright (c) 2015 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: cmd-find.c,v 1.65 2018/05/28 11:50:47 nicm Exp $ */ /* * Copyright (c) 2015 Nicholas Marriott *************** *** 112,118 **** return (NULL); RB_FOREACH(wp, window_pane_tree, &all_window_panes) { ! if (strcmp(wp->tty, c->ttyname) == 0) break; } if (wp != NULL) --- 112,118 ---- return (NULL); RB_FOREACH(wp, window_pane_tree, &all_window_panes) { ! if (wp->fd != -1 && strcmp(wp->tty, c->ttyname) == 0) break; } if (wp != NULL) *************** *** 223,229 **** } /* ! * Find the best winlink for a window (the current if it contains the pane, * otherwise the first). */ static int --- 223,229 ---- } /* ! * Find the best winlink for a window (the current if it contains the window, * otherwise the first). */ static int *************** *** 919,924 **** --- 919,928 ---- cmd_find_log_state(__func__, fs); return (0); + } + else { + log_debug("%s: session $%u does not have pane %%%u", + __func__, s->id, wp->id); } }