From c0a52a077a93202b5e3f6728d300943d8972961a Mon Sep 17 00:00:00 2001 From: nicm Date: Sun, 23 Aug 2009 17:29:51 +0000 Subject: When using source-file, run the commands in the context of the source-file command rather than with no context. This makes things like attach work from a file. --- usr.bin/tmux/cmd-source-file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr.bin/tmux/cmd-source-file.c') diff --git a/usr.bin/tmux/cmd-source-file.c b/usr.bin/tmux/cmd-source-file.c index 6193a4fafc7..89a21202299 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.3 2009/07/26 12:58:44 nicm Exp $ */ +/* $OpenBSD: cmd-source-file.c,v 1.4 2009/08/23 17:29:51 nicm Exp $ */ /* * Copyright (c) 2008 Tiago Cunha @@ -90,7 +90,7 @@ cmd_source_file_exec(struct cmd *self, struct cmd_ctx *ctx) struct cmd_source_file_data *data = self->data; char *cause; - if (load_cfg(data->path, &cause) != 0) { + if (load_cfg(data->path, ctx, &cause) != 0) { ctx->error(ctx, "%s", cause); xfree(cause); return (-1); -- cgit v1.2.3-59-g8ed1b