summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/cmd-source-file.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2019-12-19 09:22:34 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2019-12-19 09:22:34 +0000
commita3979efc302bbe96c95d420f358be38bd59b510c (patch)
treef5319daa28475face7b417aa321dda365e22e034 /usr.bin/tmux/cmd-source-file.c
parent5aa3aeb10e0552d44d3905bbbb46eb704d6c68c6 (diff)
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.
Diffstat (limited to 'usr.bin/tmux/cmd-source-file.c')
-rw-r--r--usr.bin/tmux/cmd-source-file.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/tmux/cmd-source-file.c b/usr.bin/tmux/cmd-source-file.c
index 1295668eee2..43003913d75 100644
--- a/usr.bin/tmux/cmd-source-file.c
+++ b/usr.bin/tmux/cmd-source-file.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-source-file.c,v 1.43 2019/12/18 07:48:56 nicm Exp $ */
+/* $OpenBSD: cmd-source-file.c,v 1.44 2019/12/19 09:22:33 nicm Exp $ */
/*
* Copyright (c) 2008 Tiago Cunha <me@tiagocunha.org>
@@ -114,6 +114,7 @@ cmd_source_file_done(struct client *c, const char *path, int error,
static void
cmd_source_file_add(struct cmd_source_file_data *cdata, const char *path)
{
+ log_debug("%s: %s", __func__, path);
cdata->files = xreallocarray(cdata->files, cdata->nfiles + 1,
sizeof *cdata->files);
cdata->files[cdata->nfiles++] = xstrdup(path);