mirror of
https://github.com/tmate-io/tmate.git
synced 2024-11-23 08:33:17 +01:00
Sync OpenBSD patchset 289:
The cursession member in struct cmd_ctx is always either curclient->session or NULL when curclient is also NULL, so just eliminate it.
This commit is contained in:
parent
266c13df18
commit
2e2e762743
3
cfg.c
3
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 <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;
|
||||
|
@ -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 <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;
|
||||
|
@ -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 <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;
|
||||
|
6
cmd.c
6
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 <nicm@users.sourceforge.net>
|
||||
@ -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
|
||||
|
@ -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 <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;
|
||||
|
@ -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 <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;
|
||||
|
||||
|
4
tmux.h
4
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 <nicm@users.sourceforge.net>
|
||||
@ -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 *, ...);
|
||||
|
Loading…
Reference in New Issue
Block a user