diff options
author | nicm <nicm> | 2018-05-28 11:50:47 +0000 |
---|---|---|
committer | nicm <nicm> | 2018-05-28 11:50:47 +0000 |
commit | c177a627d26d0e254390d27ad6348ea681ff0f7d (patch) | |
tree | 5481d6a44153d262eb1fc936808ecd746574d988 /cmd-find.c | |
parent | b602c1fb9a9c12ce9876e21e28ddf7ad8b6556e6 (diff) |
When looking for panes, ignore dead ones (with -1 file
descriptor). GitHub issue 1354.
Diffstat (limited to 'cmd-find.c')
-rw-r--r-- | cmd-find.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -112,7 +112,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) @@ -223,7 +223,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 @@ -920,6 +920,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); + } } /* |