From 4f2d77ce3058b3f2a6e8527eb8896e4b7047af23 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Fri, 3 May 2019 21:21:01 +0000 Subject: Fix order of insertion in load_cfg. --- usr.bin/tmux/cfg.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'usr.bin/tmux/cfg.c') diff --git a/usr.bin/tmux/cfg.c b/usr.bin/tmux/cfg.c index b4d4f89f6d8..0ba4ae4e118 100644 --- a/usr.bin/tmux/cfg.c +++ b/usr.bin/tmux/cfg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cfg.c,v 1.68 2019/04/18 11:07:28 nicm Exp $ */ +/* $OpenBSD: cfg.c,v 1.69 2019/05/03 21:21:00 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott @@ -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); -- cgit v1.2.3