From 33046ecee2090a7ff733097d1c05d377936b3e5f Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 30 Nov 2020 13:37:45 +0000 Subject: [PATCH] Ignore running command when checking for no-hooks flag if it is blocked. GitHub issue 2483. --- cmd-queue.c | 6 +++++- tmux.1 | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/cmd-queue.c b/cmd-queue.c index 36f1c9be..05f439f5 100644 --- a/cmd-queue.c +++ b/cmd-queue.c @@ -768,7 +768,11 @@ cmdq_running(struct client *c) { struct cmdq_list *queue = cmdq_get(c); - return (queue->item); + if (queue->item == NULL) + return (NULL); + if (queue->item->flags & CMDQ_WAITING) + return (NULL); + return (queue->item); } /* Print a guard line. */ diff --git a/tmux.1 b/tmux.1 index 4cc4bfe4..b3a74b0a 100644 --- a/tmux.1 +++ b/tmux.1 @@ -2112,7 +2112,8 @@ and .Ic display-panes-active-colour session options. The indicator is closed when a key is pressed (unless -.Fl N is given) or +.Fl N +is given) or .Ar duration milliseconds have passed. If