summaryrefslogtreecommitdiffstats
path: root/spawn.c
diff options
context:
space:
mode:
authornicm <nicm>2019-10-07 07:14:07 +0000
committernicm <nicm>2019-10-07 07:14:07 +0000
commit4e2cc0ae2a518371d1411bc327f113fc4898954c (patch)
tree5c63ee877308d526fe817d5da0c8b51a52d5c158 /spawn.c
parent02253d1e5c881be95fd2fc37b4c4209640b6b266 (diff)
Fix respawn-pane/window if default-command is set, reported by Janos Barbero.
Diffstat (limited to 'spawn.c')
-rw-r--r--spawn.c2
1 files changed, 1 insertions, 1 deletions
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;