=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/cmd-new-window.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- src/usr.bin/tmux/cmd-new-window.c 2011/01/04 00:42:47 1.17 +++ src/usr.bin/tmux/cmd-new-window.c 2011/12/09 16:28:18 1.18 @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-new-window.c,v 1.17 2011/01/04 00:42:47 nicm Exp $ */ +/* $OpenBSD: cmd-new-window.c,v 1.18 2011/12/09 16:28:18 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -98,13 +98,7 @@ cmd = options_get_string(&s->options, "default-command"); else cmd = args->argv[0]; - 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; - } + cwd = cmd_get_default_path(ctx); if (idx == -1) idx = -1 - options_get_number(&s->options, "base-index");