diff --git a/cfg.c b/cfg.c index d1bfafb8..be3579ad 100644 --- a/cfg.c +++ b/cfg.c @@ -1,4 +1,4 @@ -/* $Id: cfg.c,v 1.20 2009-08-09 17:53:50 tcunha Exp $ */ +/* $Id: cfg.c,v 1.21 2009-08-24 16:24:18 tcunha Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott @@ -88,7 +88,6 @@ load_cfg(const char *path, char **cause) cfg_cause = NULL; ctx.msgdata = NULL; - ctx.cursession = NULL; ctx.curclient = NULL; ctx.error = cfg_error; diff --git a/cmd-command-prompt.c b/cmd-command-prompt.c index d8bfff66..9a8a1fb6 100644 --- a/cmd-command-prompt.c +++ b/cmd-command-prompt.c @@ -1,4 +1,4 @@ -/* $Id: cmd-command-prompt.c,v 1.23 2009-08-20 11:51:20 tcunha Exp $ */ +/* $Id: cmd-command-prompt.c,v 1.24 2009-08-24 16:24:18 tcunha Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott @@ -238,7 +238,6 @@ cmd_command_prompt_callback(void *data, const char *s) } ctx.msgdata = NULL; - ctx.cursession = c->session; ctx.curclient = c; ctx.error = key_bindings_error; diff --git a/cmd-confirm-before.c b/cmd-confirm-before.c index eca42b39..5c2dd109 100644 --- a/cmd-confirm-before.c +++ b/cmd-confirm-before.c @@ -1,4 +1,4 @@ -/* $Id: cmd-confirm-before.c,v 1.10 2009-08-16 19:29:24 tcunha Exp $ */ +/* $Id: cmd-confirm-before.c,v 1.11 2009-08-24 16:24:18 tcunha Exp $ */ /* * Copyright (c) 2009 Tiago Cunha @@ -122,7 +122,6 @@ cmd_confirm_before_callback(void *data, const char *s) } ctx.msgdata = NULL; - ctx.cursession = c->session; ctx.curclient = c; ctx.error = key_bindings_error; diff --git a/cmd.c b/cmd.c index 192d0add..4ff05eb4 100644 --- a/cmd.c +++ b/cmd.c @@ -1,4 +1,4 @@ -/* $Id: cmd.c,v 1.112 2009-08-09 17:48:55 tcunha Exp $ */ +/* $Id: cmd.c,v 1.113 2009-08-24 16:24:18 tcunha Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -298,8 +298,8 @@ cmd_current_session(struct cmd_ctx *ctx) u_int i; int found; - if (ctx->cursession != NULL) - return (ctx->cursession); + if (ctx->curclient != NULL && ctx->curclient->session != NULL) + return (ctx->curclient->session); /* * If the name of the calling client's pty is know, build a list of the diff --git a/key-bindings.c b/key-bindings.c index b9096e37..56b0fb71 100644 --- a/key-bindings.c +++ b/key-bindings.c @@ -1,4 +1,4 @@ -/* $Id: key-bindings.c,v 1.79 2009-07-25 08:52:04 tcunha Exp $ */ +/* $Id: key-bindings.c,v 1.80 2009-08-24 16:24:18 tcunha Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -218,7 +218,7 @@ key_bindings_error(struct cmd_ctx *ctx, const char *fmt, ...) void printflike2 key_bindings_print(struct cmd_ctx *ctx, const char *fmt, ...) { - struct winlink *wl = ctx->cursession->curw; + struct winlink *wl = ctx->curclient->session->curw; va_list ap; if (wl->window->active->mode != &window_more_mode) @@ -254,7 +254,6 @@ key_bindings_dispatch(struct key_binding *bd, struct client *c) struct cmd_ctx ctx; ctx.msgdata = NULL; - ctx.cursession = c->session; ctx.curclient = c; ctx.error = key_bindings_error; diff --git a/server-msg.c b/server-msg.c index e5f7a20e..9e20a6b1 100644 --- a/server-msg.c +++ b/server-msg.c @@ -1,4 +1,4 @@ -/* $Id: server-msg.c,v 1.81 2009-08-14 21:31:20 tcunha Exp $ */ +/* $Id: server-msg.c,v 1.82 2009-08-24 16:24:18 tcunha Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -188,7 +188,6 @@ server_msg_command(struct client *c, struct msg_command_data *data) ctx.msgdata = data; ctx.curclient = NULL; - ctx.cursession = NULL; ctx.cmdclient = c; diff --git a/tmux.h b/tmux.h index b38c5fac..530c711b 100644 --- a/tmux.h +++ b/tmux.h @@ -1,4 +1,4 @@ -/* $Id: tmux.h,v 1.425 2009-08-20 11:51:20 tcunha Exp $ */ +/* $Id: tmux.h,v 1.426 2009-08-24 16:24:18 tcunha Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -986,8 +986,6 @@ struct cmd_ctx { struct client *curclient; struct client *cmdclient; - struct session *cursession; - struct msg_command_data *msgdata; void printflike2 (*print)(struct cmd_ctx *, const char *, ...);