Per-session configuration options.

This commit is contained in:
Nicholas Marriott
2008-06-03 21:42:37 +00:00
parent 85d520c41e
commit 9e6090a7a2
20 changed files with 343 additions and 102 deletions

View File

@ -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);