mirror of
https://github.com/tmux/tmux.git
synced 2025-09-02 05:21:10 +00:00
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:
8
cfg.c
8
cfg.c
@ -185,9 +185,9 @@ load_cfg(const char *path, struct client *c, struct cmdq_item *item, int flags,
|
||||
|
||||
new_item0 = cmdq_get_command(pr->cmdlist, NULL, NULL, 0);
|
||||
if (item != NULL)
|
||||
cmdq_insert_after(item, new_item0);
|
||||
new_item0 = cmdq_insert_after(item, new_item0);
|
||||
else
|
||||
cmdq_append(NULL, new_item0);
|
||||
new_item0 = cmdq_append(NULL, new_item0);
|
||||
cmd_list_free(pr->cmdlist);
|
||||
|
||||
if (new_item != NULL)
|
||||
@ -231,9 +231,9 @@ load_cfg_from_buffer(const void *buf, size_t len, const char *path,
|
||||
|
||||
new_item0 = cmdq_get_command(pr->cmdlist, NULL, NULL, 0);
|
||||
if (item != NULL)
|
||||
cmdq_insert_after(item, new_item0);
|
||||
new_item0 = cmdq_insert_after(item, new_item0);
|
||||
else
|
||||
cmdq_append(NULL, new_item0);
|
||||
new_item0 = cmdq_append(NULL, new_item0);
|
||||
cmd_list_free(pr->cmdlist);
|
||||
|
||||
if (new_item != NULL)
|
||||
|
Reference in New Issue
Block a user