summaryrefslogtreecommitdiffstats
path: root/notify.c
diff options
context:
space:
mode:
authornicm <nicm>2019-12-19 09:22:33 +0000
committernicm <nicm>2019-12-19 09:22:33 +0000
commit1764f66b7d1ed0e494cfa8967c78ace8728ee86c (patch)
tree84e6483ab9ec00b4f22e61d764b866562ac6e0d8 /notify.c
parentef54a08080ef7d721d05361bf10e27217c87590e (diff)
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.
Diffstat (limited to 'notify.c')
-rw-r--r--notify.c4
1 files changed, 1 insertions, 3 deletions
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);
}