mirror of
https://github.com/tmux/tmux.git
synced 2025-01-14 20:58:53 +00:00
Do not include unattached clients when trying to find one for target.
This commit is contained in:
parent
b7777e7ef3
commit
c2bc84aa4d
@ -125,11 +125,15 @@ cmd_find_best_client(struct client **clist, u_int csize)
|
||||
c = NULL;
|
||||
if (clist != NULL) {
|
||||
for (i = 0; i < csize; i++) {
|
||||
if (clist[i]->session == NULL)
|
||||
continue;
|
||||
if (cmd_find_client_better(clist[i], c))
|
||||
c = clist[i];
|
||||
}
|
||||
} else {
|
||||
TAILQ_FOREACH(c_loop, &clients, entry) {
|
||||
if (c_loop->session == NULL)
|
||||
continue;
|
||||
if (cmd_find_client_better(c_loop, c))
|
||||
c = c_loop;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user