Fix respawn-pane/window if default-command is set, reported by Janos Barbero.

pull/1933/head
nicm 2019-10-07 07:14:07 +00:00
parent 02253d1e5c
commit 4e2cc0ae2a
1 changed files with 1 additions and 1 deletions

View File

@ -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;