summaryrefslogtreecommitdiffstats
path: root/cmd.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2013-03-22 15:54:29 +0000
committerNicholas Marriott <nicm@openbsd.org>2013-03-22 15:54:29 +0000
commit2243cfbe7559e6cf48194ff95dcd7eb6df5fe41d (patch)
treed1cf60483d7b08f01f00610c5e341d26520557c9 /cmd.c
parentd644e5143fbce243ddcca468a1b8a1d5bfd21b34 (diff)
Need to set clients in context before changing their reference count.
Diffstat (limited to 'cmd.c')
-rw-r--r--cmd.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/cmd.c b/cmd.c
index beb3fb5e..6ab1f430 100644
--- a/cmd.c
+++ b/cmd.c
@@ -134,13 +134,16 @@ int cmd_find_index_offset(const char *, struct session *, int *);
struct window_pane *cmd_find_pane_offset(const char *, struct winlink *);
struct cmd_ctx *
-cmd_get_ctx(void)
+cmd_get_ctx(struct client *cmdclient, struct client *curclient)
{
struct cmd_ctx *ctx;
ctx = xcalloc(1, sizeof *ctx);
ctx->references = 0;
+ ctx->cmdclient = cmdclient;
+ ctx->curclient = curclient;
+
cmd_ref_ctx(ctx);
return (ctx);
}