From 1764f66b7d1ed0e494cfa8967c78ace8728ee86c Mon Sep 17 00:00:00 2001 From: nicm Date: Thu, 19 Dec 2019 09:22:33 +0000 Subject: When adding a list with multiple commands to the queue, the next item to insert after needs to be the last one added, not the first. Reported by Jason Kim in GitHub issue 2023. --- notify.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'notify.c') diff --git a/notify.c b/notify.c index 3079f0eb..c91a4399 100644 --- a/notify.c +++ b/notify.c @@ -90,9 +90,7 @@ notify_insert_hook(struct cmdq_item *item, struct notify_entry *ne) new_item = cmdq_get_command(cmdlist, &fs, NULL, CMDQ_NOHOOKS); cmdq_format(new_item, "hook", "%s", ne->name); notify_hook_formats(new_item, s, w, ne->pane); - - cmdq_insert_after(item, new_item); - item = new_item; + item = cmdq_insert_after(item, new_item); a = options_array_next(a); } -- cgit v1.2.3