diff --git a/cfg.c b/cfg.c index 0eadb6c3..1b85ac95 100644 --- a/cfg.c +++ b/cfg.c @@ -302,9 +302,10 @@ load_cfg(const char *path, struct client *c, struct cmdq_item *item, int quiet) free(buf); new_item = cmdq_get_command(cmdlist, NULL, NULL, 0); - if (item != NULL) + if (item != NULL) { cmdq_insert_after(item, new_item); - else + item = new_item; + } else cmdq_append(c, new_item); cmd_list_free(cmdlist);