diff options
author | 2013-10-10 12:04:38 +0000 | |
---|---|---|
committer | 2013-10-10 12:04:38 +0000 | |
commit | d9ada8a18a357e36c5b3bd0fd3f9ba988e079ad5 (patch) | |
tree | ec4ef5cb6a2dcd664af7e0463eb05479f1607b19 /usr.bin/tmux/cmd-queue.c | |
parent | Restore missing key binding for %, from Chris Johnsen. (diff) | |
download | wireguard-openbsd-d9ada8a18a357e36c5b3bd0fd3f9ba988e079ad5.tar.xz wireguard-openbsd-d9ada8a18a357e36c5b3bd0fd3f9ba988e079ad5.zip |
Make cmdq->client_exit a tristate (-1 means "not set") so that if
explicitly set it can be copied from child to parent cmdq by if-shell
and source-file. This fixes using attach or new. From Chris Johnsen.
Diffstat (limited to 'usr.bin/tmux/cmd-queue.c')
-rw-r--r-- | usr.bin/tmux/cmd-queue.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/tmux/cmd-queue.c b/usr.bin/tmux/cmd-queue.c index 87c5fcfea7d..c1b38a03556 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.10 2013/10/10 11:45:28 nicm Exp $ */ +/* $OpenBSD: cmd-queue.c,v 1.11 2013/10/10 12:04:38 nicm Exp $ */ /* * Copyright (c) 2013 Nicholas Marriott <nicm@users.sourceforge.net> @@ -35,7 +35,7 @@ cmdq_new(struct client *c) cmdq->dead = 0; cmdq->client = c; - cmdq->client_exit = 0; + cmdq->client_exit = -1; TAILQ_INIT(&cmdq->queue); cmdq->item = NULL; @@ -259,7 +259,7 @@ cmdq_continue(struct cmd_q *cmdq) } while (cmdq->item != NULL); empty: - if (cmdq->client_exit) + if (cmdq->client_exit > 0) cmdq->client->flags |= CLIENT_EXIT; if (cmdq->emptyfn != NULL) cmdq->emptyfn(cmdq); /* may free cmdq */ |