summaryrefslogtreecommitdiffstats
path: root/cmd.c
diff options
context:
space:
mode:
authornicm <nicm>2013-10-10 12:29:35 +0000
committernicm <nicm>2013-10-10 12:29:35 +0000
commitc1ccefc62d2a70c91ac31cff141031d61cc0a12c (patch)
tree924a96d6a8d0f1fe0e98e1ad8c6bb9af6bf2be27 /cmd.c
parent6ac7abe8f038c21c1cf33d50a02e970f0de81c09 (diff)
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 'cmd.c')
-rw-r--r--cmd.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/cmd.c b/cmd.c
index b349da77..2edda633 100644
--- a/cmd.c
+++ b/cmd.c
@@ -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));
}