=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/cmd-new-window.c,v retrieving revision 1.14 retrieving revision 1.15 diff -c -r1.14 -r1.15 *** src/usr.bin/tmux/cmd-new-window.c 2010/06/21 01:27:46 1.14 --- src/usr.bin/tmux/cmd-new-window.c 2010/06/27 02:56:59 1.15 *************** *** 1,4 **** ! /* $OpenBSD: cmd-new-window.c,v 1.14 2010/06/21 01:27:46 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: cmd-new-window.c,v 1.15 2010/06/27 02:56:59 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 176,185 **** cmd = data->cmd; if (cmd == NULL) cmd = options_get_string(&s->options, "default-command"); ! if (ctx->cmdclient == NULL || ctx->cmdclient->cwd == NULL) ! cwd = options_get_string(&s->options, "default-path"); ! else ! cwd = ctx->cmdclient->cwd; if (idx == -1) idx = -1 - options_get_number(&s->options, "base-index"); --- 176,188 ---- cmd = data->cmd; if (cmd == NULL) cmd = options_get_string(&s->options, "default-command"); ! cwd = options_get_string(&s->options, "default-path"); ! if (*cwd == '\0') { ! if (ctx->cmdclient != NULL && ctx->cmdclient->cwd != NULL) ! cwd = ctx->cmdclient->cwd; ! else ! cwd = s->cwd; ! } if (idx == -1) idx = -1 - options_get_number(&s->options, "base-index");