summaryrefslogtreecommitdiffstats
path: root/cmd-find.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2018-05-28 15:02:31 +0100
committerThomas Adam <thomas@xteddy.org>2018-05-28 15:02:31 +0100
commit058d2b94dc6cad58b8c500988eb91580b6afe397 (patch)
tree53cad1dd4af66d0f78c1fe4545dc1a3dd324d395 /cmd-find.c
parent8f8e0975f1427f24cc1a129edc7116261ef78cb1 (diff)
parentc177a627d26d0e254390d27ad6348ea681ff0f7d (diff)
Merge branch 'obsd-master'
Diffstat (limited to 'cmd-find.c')
-rw-r--r--cmd-find.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/cmd-find.c b/cmd-find.c
index 0c86e548..e8c82772 100644
--- a/cmd-find.c
+++ b/cmd-find.c
@@ -111,7 +111,7 @@ cmd_find_inside_pane(struct client *c)
return (NULL);
RB_FOREACH(wp, window_pane_tree, &all_window_panes) {
- if (strcmp(wp->tty, c->ttyname) == 0)
+ if (wp->fd != -1 && strcmp(wp->tty, c->ttyname) == 0)
break;
}
if (wp != NULL)
@@ -222,7 +222,7 @@ fail:
}
/*
- * Find the best winlink for a window (the current if it contains the pane,
+ * Find the best winlink for a window (the current if it contains the window,
* otherwise the first).
*/
static int
@@ -919,6 +919,10 @@ cmd_find_from_client(struct cmd_find_state *fs, struct client *c, int flags)
cmd_find_log_state(__func__, fs);
return (0);
}
+ else {
+ log_debug("%s: session $%u does not have pane %%%u",
+ __func__, s->id, wp->id);
+ }
}
/*