summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/cmd.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2013-10-10 12:29:35 +0000
committernicm <nicm@openbsd.org>2013-10-10 12:29:35 +0000
commitd87b01fb5034d17ba73d2da58ecfc53e23c31041 (patch)
treeb6377eda32d6538e6cf25219f0af5b4818737279 /usr.bin/tmux/cmd.c
parentRemove now unused cmd_get_default_path. (diff)
downloadwireguard-openbsd-d87b01fb5034d17ba73d2da58ecfc53e23c31041.tar.xz
wireguard-openbsd-d87b01fb5034d17ba73d2da58ecfc53e23c31041.zip
We accidentally haven't been using $TMUX to work out the session for a
while and in fact it is less useful that using the client ttyname. So don't bother and don't pass it from the client. If we need it in future it is in c->environ.
Diffstat (limited to 'usr.bin/tmux/cmd.c')
-rw-r--r--usr.bin/tmux/cmd.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/usr.bin/tmux/cmd.c b/usr.bin/tmux/cmd.c
index 323605fc020..026c5e584c2 100644
--- a/usr.bin/tmux/cmd.c
+++ b/usr.bin/tmux/cmd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd.c,v 1.88 2013/10/10 12:28:56 nicm Exp $ */
+/* $OpenBSD: cmd.c,v 1.89 2013/10/10 12:29:35 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -314,7 +314,6 @@ cmd_print(struct cmd *cmd, char *buf, size_t len)
struct session *
cmd_current_session(struct cmd_q *cmdq, int prefer_unattached)
{
- struct msg_command_data *data = cmdq->msgdata;
struct client *c = cmdq->client;
struct session *s;
struct sessionslist ss;
@@ -356,13 +355,6 @@ cmd_current_session(struct cmd_q *cmdq, int prefer_unattached)
return (s);
}
- /* Use the session from the TMUX environment variable. */
- if (data != NULL && data->pid == getpid() && data->session_id != -1) {
- s = session_find_by_id(data->session_id);
- if (s != NULL)
- return (s);
- }
-
return (cmd_choose_session(prefer_unattached));
}