diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2014-10-21 22:06:47 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2014-10-21 22:06:47 +0000 |
commit | be1836a41e3b864e6010e78ef7cdd9f0c00d4839 (patch) | |
tree | 8c4a36c2ed5e969d64cfa37ee76c1fc1e2a3be75 /usr.bin | |
parent | 5de3e50959f013adebcc67d3305eb5da1ca8198f (diff) |
Save next item after firing command in case it has added to the queue.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/tmux/cmd-queue.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.bin/tmux/cmd-queue.c b/usr.bin/tmux/cmd-queue.c index 9200f208cc3..5c331e6c678 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.18 2014/10/20 23:57:13 nicm Exp $ */ +/* $OpenBSD: cmd-queue.c,v 1.19 2014/10/21 22:06:46 nicm Exp $ */ /* * Copyright (c) 2013 Nicholas Marriott <nicm@users.sourceforge.net> @@ -180,8 +180,6 @@ cmdq_continue(struct cmd_q *cmdq) cmdq->cmd = TAILQ_NEXT(cmdq->cmd, qentry); do { - next = TAILQ_NEXT(cmdq->item, qentry); - while (cmdq->cmd != NULL) { cmd_print(cmdq->cmd, s, sizeof s); log_debug("cmdq %p: %s (client %d)", cmdq, s, @@ -213,6 +211,7 @@ cmdq_continue(struct cmd_q *cmdq) cmdq->cmd = TAILQ_NEXT(cmdq->cmd, qentry); } + next = TAILQ_NEXT(cmdq->item, qentry); TAILQ_REMOVE(&cmdq->queue, cmdq->item, qentry); cmd_list_free(cmdq->item->cmdlist); |