mirror of
https://github.com/tmux/tmux.git
synced 2024-11-16 09:28:51 +00:00
Don't boke when figuring out working directory from configuration file.
This commit is contained in:
parent
7936ce3874
commit
909e1c1a86
@ -115,7 +115,7 @@ cmd_new_session_exec(struct cmd *self, struct cmd_q *cmdq)
|
|||||||
return (CMD_RETURN_ERROR);
|
return (CMD_RETURN_ERROR);
|
||||||
}
|
}
|
||||||
cwd = fd;
|
cwd = fd;
|
||||||
} else if (c->session == NULL)
|
} else if (c != NULL && c->session == NULL)
|
||||||
cwd = c->cwd;
|
cwd = c->cwd;
|
||||||
else if ((c0 = cmd_current_client(cmdq)) != NULL)
|
else if ((c0 = cmd_current_client(cmdq)) != NULL)
|
||||||
cwd = c0->session->cwd;
|
cwd = c0->session->cwd;
|
||||||
|
@ -125,7 +125,7 @@ cmd_new_window_exec(struct cmd *self, struct cmd_q *cmdq)
|
|||||||
return (CMD_RETURN_ERROR);
|
return (CMD_RETURN_ERROR);
|
||||||
}
|
}
|
||||||
cwd = fd;
|
cwd = fd;
|
||||||
} else if (cmdq->client->session == NULL)
|
} else if (cmdq->client != NULL && cmdq->client->session == NULL)
|
||||||
cwd = cmdq->client->cwd;
|
cwd = cmdq->client->cwd;
|
||||||
else
|
else
|
||||||
cwd = s->cwd;
|
cwd = s->cwd;
|
||||||
|
@ -103,7 +103,7 @@ cmd_split_window_exec(struct cmd *self, struct cmd_q *cmdq)
|
|||||||
return (CMD_RETURN_ERROR);
|
return (CMD_RETURN_ERROR);
|
||||||
}
|
}
|
||||||
cwd = fd;
|
cwd = fd;
|
||||||
} else if (cmdq->client->session == NULL)
|
} else if (cmdq->client != NULL && cmdq->client->session == NULL)
|
||||||
cwd = cmdq->client->cwd;
|
cwd = cmdq->client->cwd;
|
||||||
else
|
else
|
||||||
cwd = s->cwd;
|
cwd = s->cwd;
|
||||||
|
Loading…
Reference in New Issue
Block a user