diff options
author | 2017-04-21 20:26:34 +0000 | |
---|---|---|
committer | 2017-04-21 20:26:34 +0000 | |
commit | 93e732aabece4c2ef75ec9f2a56d777a036b3a8f (patch) | |
tree | 94a5a050dda2622774a4c16e6794e7a36d192831 /usr.bin/tmux/cmd-queue.c | |
parent | Key needs to be initialized to zero now it has flags in it. (diff) | |
download | wireguard-openbsd-93e732aabece4c2ef75ec9f2a56d777a036b3a8f.tar.xz wireguard-openbsd-93e732aabece4c2ef75ec9f2a56d777a036b3a8f.zip |
Make the cmd_find_* functions more obvious when looking for a client,
rather than having it inside other functions. Should be no change to the
way targets are resolved just yet.
Diffstat (limited to 'usr.bin/tmux/cmd-queue.c')
-rw-r--r-- | usr.bin/tmux/cmd-queue.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/usr.bin/tmux/cmd-queue.c b/usr.bin/tmux/cmd-queue.c index f1f88e0bb9b..2d587aba146 100644 --- a/usr.bin/tmux/cmd-queue.c +++ b/usr.bin/tmux/cmd-queue.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-queue.c,v 1.50 2017/04/21 18:18:17 nicm Exp $ */ +/* $OpenBSD: cmd-queue.c,v 1.51 2017/04/21 20:26:34 nicm Exp $ */ /* * Copyright (c) 2013 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -216,11 +216,12 @@ cmdq_fire_command(struct cmdq_item *item) name = cmd->entry->name; if (cmd_find_valid_state(&item->state.tflag)) fsp = &item->state.tflag; - else { - if (cmd_find_current(&fs, item, CMD_FIND_QUIET) != 0) - goto out; + else if (cmd_find_valid_state(&item->shared->current)) + fsp = &item->shared->current; + else if (cmd_find_from_client(&fs, item->client) == 0) fsp = &fs; - } + else + goto out; hooks_insert(fsp->s->hooks, item, fsp, "after-%s", name); } |