diff options
author | 2020-03-02 08:30:30 +0000 | |
---|---|---|
committer | 2020-03-02 08:30:30 +0000 | |
commit | 6e86b7cad6c94bf4210af71116c9723bb2358cba (patch) | |
tree | 33490b3031b3fe6b4075812dd2e1964097f57f5a /usr.bin/tmux/spawn.c | |
parent | Update ix(4) from freebsd to add support for X553 controllers. (diff) | |
download | wireguard-openbsd-6e86b7cad6c94bf4210af71116c9723bb2358cba.tar.xz wireguard-openbsd-6e86b7cad6c94bf4210af71116c9723bb2358cba.zip |
Use current session for cwd of new sessions, not the new session which
doesn't have one yet. GitHub issue 2091.
Diffstat (limited to 'usr.bin/tmux/spawn.c')
-rw-r--r-- | usr.bin/tmux/spawn.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/tmux/spawn.c b/usr.bin/tmux/spawn.c index 70c48a12ed1..6cbd837c14b 100644 --- a/usr.bin/tmux/spawn.c +++ b/usr.bin/tmux/spawn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: spawn.c,v 1.14 2020/01/28 10:21:21 nicm Exp $ */ +/* $OpenBSD: spawn.c,v 1.15 2020/03/02 08:30:30 nicm Exp $ */ /* * Copyright (c) 2019 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -230,9 +230,9 @@ spawn_pane(struct spawn_context *sc, char **cause) * the pane's stored one unless specified. */ if (sc->cwd != NULL) - cwd = format_single(item, sc->cwd, c, s, NULL, NULL); + cwd = format_single(item, sc->cwd, c, item->target.s, NULL, NULL); else if (~sc->flags & SPAWN_RESPAWN) - cwd = xstrdup(server_client_get_cwd(c, s)); + cwd = xstrdup(server_client_get_cwd(c, item->target.s)); else cwd = NULL; |