aboutsummaryrefslogtreecommitdiff
path: root/cmd-new-window.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmd-new-window.c')
-rw-r--r--cmd-new-window.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/cmd-new-window.c b/cmd-new-window.c
index 8f09da0a..030847b5 100644
--- a/cmd-new-window.c
+++ b/cmd-new-window.c
@@ -1,4 +1,4 @@
-/* $Id: cmd-new-window.c,v 1.19 2008-06-03 16:55:09 nicm Exp $ */
+/* $Id: cmd-new-window.c,v 1.20 2008-06-03 21:42:37 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -138,13 +138,13 @@ cmd_new_window_exec(void *ptr, struct cmd_ctx *ctx)
struct winlink *wl;
char *cmd;
- cmd = data->cmd;
- if (cmd == NULL)
- cmd = default_command;
-
if ((s = cmd_find_session(ctx, data->cname, data->sname)) == NULL)
return;
+ cmd = data->cmd;
+ if (cmd == NULL)
+ cmd = options_get_string(&s->options, "default-command");
+
if (data->idx < 0)
data->idx = -1;
wl = session_new(s, data->name, cmd, data->idx);