aboutsummaryrefslogtreecommitdiff
path: root/cmd.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2013-10-06 22:38:33 +0100
committerNicholas Marriott <nicholas.marriott@gmail.com>2013-10-06 22:38:33 +0100
commite9b09faab262f179fec936c4036713866b98e3d0 (patch)
tree75efa6b12a3b46b846d7c1eb39bb4894c2b25b2f /cmd.c
parent5ea6148362e6f80019b0f41c29bdc395c69e41dc (diff)
downloadrtmux-e9b09faab262f179fec936c4036713866b98e3d0.tar.gz
rtmux-e9b09faab262f179fec936c4036713866b98e3d0.tar.bz2
rtmux-e9b09faab262f179fec936c4036713866b98e3d0.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 'cmd.c')
-rw-r--r--cmd.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/cmd.c b/cmd.c
index 90756951..414c9067 100644
--- a/cmd.c
+++ b/cmd.c
@@ -313,7 +313,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;
@@ -355,13 +354,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));
}