diff options
-rw-r--r-- | usr.bin/tmux/cfg.c | 3 | ||||
-rw-r--r-- | usr.bin/tmux/cmd-command-prompt.c | 3 | ||||
-rw-r--r-- | usr.bin/tmux/cmd-confirm-before.c | 3 | ||||
-rw-r--r-- | usr.bin/tmux/cmd.c | 6 | ||||
-rw-r--r-- | usr.bin/tmux/key-bindings.c | 5 | ||||
-rw-r--r-- | usr.bin/tmux/server-msg.c | 3 | ||||
-rw-r--r-- | usr.bin/tmux/tmux.h | 4 |
7 files changed, 10 insertions, 17 deletions
diff --git a/usr.bin/tmux/cfg.c b/usr.bin/tmux/cfg.c index 99a200da38b..92515418fbc 100644 --- a/usr.bin/tmux/cfg.c +++ b/usr.bin/tmux/cfg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cfg.c,v 1.4 2009/08/09 08:34:17 nicm Exp $ */ +/* $OpenBSD: cfg.c,v 1.5 2009/08/23 16:45:00 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net> @@ -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/usr.bin/tmux/cmd-command-prompt.c b/usr.bin/tmux/cmd-command-prompt.c index 0e50ac6755e..bc65e877937 100644 --- a/usr.bin/tmux/cmd-command-prompt.c +++ b/usr.bin/tmux/cmd-command-prompt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-command-prompt.c,v 1.8 2009/08/19 10:39:50 nicm Exp $ */ +/* $OpenBSD: cmd-command-prompt.c,v 1.9 2009/08/23 16:45:00 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net> @@ -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/usr.bin/tmux/cmd-confirm-before.c b/usr.bin/tmux/cmd-confirm-before.c index 87ce4c24969..b920a0979d4 100644 --- a/usr.bin/tmux/cmd-confirm-before.c +++ b/usr.bin/tmux/cmd-confirm-before.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-confirm-before.c,v 1.7 2009/08/13 23:44:18 nicm Exp $ */ +/* $OpenBSD: cmd-confirm-before.c,v 1.8 2009/08/23 16:45:00 nicm Exp $ */ /* * Copyright (c) 2009 Tiago Cunha <me@tiagocunha.org> @@ -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/usr.bin/tmux/cmd.c b/usr.bin/tmux/cmd.c index b2e8203a02e..7bd5af4de7d 100644 --- a/usr.bin/tmux/cmd.c +++ b/usr.bin/tmux/cmd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd.c,v 1.13 2009/08/08 21:52:43 nicm Exp $ */ +/* $OpenBSD: cmd.c,v 1.14 2009/08/23 16:45:00 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -299,8 +299,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/usr.bin/tmux/key-bindings.c b/usr.bin/tmux/key-bindings.c index 5a07b0ace2d..43eb27ee2d4 100644 --- a/usr.bin/tmux/key-bindings.c +++ b/usr.bin/tmux/key-bindings.c @@ -1,4 +1,4 @@ -/* $OpenBSD: key-bindings.c,v 1.8 2009/07/24 14:52:47 nicm Exp $ */ +/* $OpenBSD: key-bindings.c,v 1.9 2009/08/23 16:45:00 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -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/usr.bin/tmux/server-msg.c b/usr.bin/tmux/server-msg.c index a317971b287..cfbb66dd490 100644 --- a/usr.bin/tmux/server-msg.c +++ b/usr.bin/tmux/server-msg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server-msg.c,v 1.14 2009/08/13 12:15:45 nicm Exp $ */ +/* $OpenBSD: server-msg.c,v 1.15 2009/08/23 16:45:00 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -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/usr.bin/tmux/tmux.h b/usr.bin/tmux/tmux.h index 15ce7681cb1..4532a2df7bd 100644 --- a/usr.bin/tmux/tmux.h +++ b/usr.bin/tmux/tmux.h @@ -1,4 +1,4 @@ -/* $OpenBSD: tmux.h,v 1.87 2009/08/19 10:39:50 nicm Exp $ */ +/* $OpenBSD: tmux.h,v 1.88 2009/08/23 16:45:00 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -988,8 +988,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 *, ...); |