diff options
author | 2019-05-03 21:21:00 +0000 | |
---|---|---|
committer | 2019-05-03 21:21:00 +0000 | |
commit | bd62e80ad6f2e4d7cddc30fa96cac10d3b90cbfa (patch) | |
tree | 2b89ed4f89c89a0fbc06bebdd392c37898fbf9b1 | |
parent | Allow panes to be empty (no command), output can be piped to them with (diff) | |
download | wireguard-openbsd-bd62e80ad6f2e4d7cddc30fa96cac10d3b90cbfa.tar.xz wireguard-openbsd-bd62e80ad6f2e4d7cddc30fa96cac10d3b90cbfa.zip |
Fix order of insertion in load_cfg.
-rw-r--r-- | usr.bin/tmux/cfg.c | 7 |
1 files changed, 4 insertions, 3 deletions
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 <nicholas.marriott@gmail.com> @@ -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); |