aboutsummaryrefslogtreecommitdiff
path: root/spawn.c
diff options
context:
space:
mode:
Diffstat (limited to 'spawn.c')
-rw-r--r--spawn.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/spawn.c b/spawn.c
index 12409975..8be26fa3 100644
--- a/spawn.c
+++ b/spawn.c
@@ -159,6 +159,8 @@ spawn_window(struct spawn_context *sc, char **cause)
xasprintf(cause, "couldn't create window %d", idx);
return (NULL);
}
+ if (s->curw == NULL)
+ s->curw = sc->wl;
sc->wl->session = s;
winlink_set_window(sc->wl, w);
} else