aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornicm <nicm>2019-10-07 07:14:07 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2019-11-29 17:21:32 +0000
commit48897fbc44ebd19362ec51bc88490790618daa81 (patch)
tree78372c7d3a6fbe04768543bbbcab29f52dcd5383
parentad98fad9a3130b60ee2eba5312506ef531500117 (diff)
downloadrtmux-48897fbc44ebd19362ec51bc88490790618daa81.tar.gz
rtmux-48897fbc44ebd19362ec51bc88490790618daa81.tar.bz2
rtmux-48897fbc44ebd19362ec51bc88490790618daa81.zip
Fix respawn-pane/window if default-command is set, reported by Janos Barbero.
-rw-r--r--spawn.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/spawn.c b/spawn.c
index b8397b75..348a4e5e 100644
--- a/spawn.c
+++ b/spawn.c
@@ -250,7 +250,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;