summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--spawn.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/spawn.c b/spawn.c
index 986a1e9d..bae220e1 100644
--- a/spawn.c
+++ b/spawn.c
@@ -161,6 +161,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