From 9e6090a7a2a0d25499bce0dc68fd67289f3a5e39 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Tue, 3 Jun 2008 21:42:37 +0000 Subject: Per-session configuration options. --- cmd-new-window.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'cmd-new-window.c') 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 @@ -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); -- cgit