mirror of
https://github.com/tmux/tmux.git
synced 2025-09-02 05:21:10 +00:00
Store the current working directory in the session, change the default-path
option to default to empty and make that mean that the stored session CWD is used.
This commit is contained in:
@ -68,6 +68,8 @@ session_create(const char *name, const char *cmd, const char *cwd,
|
||||
fatal("gettimeofday failed");
|
||||
memcpy(&s->activity_time, &s->creation_time, sizeof s->activity_time);
|
||||
|
||||
s->cwd = xstrdup(cwd);
|
||||
|
||||
s->curw = NULL;
|
||||
TAILQ_INIT(&s->lastw);
|
||||
RB_INIT(&s->windows);
|
||||
@ -142,6 +144,7 @@ session_destroy(struct session *s)
|
||||
while (!RB_EMPTY(&s->windows))
|
||||
winlink_remove(&s->windows, RB_ROOT(&s->windows));
|
||||
|
||||
xfree(s->cwd);
|
||||
xfree(s->name);
|
||||
|
||||
for (i = 0; i < ARRAY_LENGTH(&dead_sessions); i++) {
|
||||
|
Reference in New Issue
Block a user