From 4e2cc0ae2a518371d1411bc327f113fc4898954c Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 7 Oct 2019 07:14:07 +0000 Subject: [PATCH] Fix respawn-pane/window if default-command is set, reported by Janos Barbero. --- spawn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spawn.c b/spawn.c index 71361c9f..d74e55f3 100644 --- a/spawn.c +++ b/spawn.c @@ -253,7 +253,7 @@ spawn_pane(struct spawn_context *sc, char **cause) * Now we have a pane with nothing running in it ready for the new * process. Work out the command and arguments. */ - if (sc->argc == 0) { + if (sc->argc == 0 && (~sc->flags & SPAWN_RESPAWN)) { cmd = options_get_string(s->options, "default-command"); if (cmd != NULL && *cmd != '\0') { argc = 1;