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.
This commit is contained in:
nicm
2019-12-19 09:22:33 +00:00
parent ef54a08080
commit 1764f66b7d
6 changed files with 26 additions and 18 deletions

View File

@ -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);
}