Ignore running command when checking for no-hooks flag if it is blocked.

GitHub issue 2483.
This commit is contained in:
nicm
2020-11-30 13:37:45 +00:00
parent fd5c3e6122
commit 33046ecee2
2 changed files with 7 additions and 2 deletions

View File

@ -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. */