diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2008-06-03 21:42:37 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2008-06-03 21:42:37 +0000 |
commit | 9e6090a7a2a0d25499bce0dc68fd67289f3a5e39 (patch) | |
tree | fd99a49a5ae948c9a1eb618cae7fd26e68d554a4 /cmd-new-window.c | |
parent | 85d520c41e74056e59f11b5d1f6dd3f5602fa17a (diff) |
Per-session configuration options.
Diffstat (limited to 'cmd-new-window.c')
-rw-r--r-- | cmd-new-window.c | 10 |
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); |