aboutsummaryrefslogtreecommitdiff
path: root/cmd-new-session.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2015-02-06 19:05:56 +0000
committerThomas Adam <thomas@xteddy.org>2015-02-06 19:07:43 +0000
commit833fe5bdee449b04afe8844774be66374e1baf9c (patch)
tree11b21f479421b08f67776c832543becaa0b12fb8 /cmd-new-session.c
parent93c3fb78a3593afd23e85352213236131dd5958f (diff)
parent313f2263f8bb3336893527f65789f820ba7eaf0f (diff)
downloadrtmux-833fe5bdee449b04afe8844774be66374e1baf9c.tar.gz
rtmux-833fe5bdee449b04afe8844774be66374e1baf9c.tar.bz2
rtmux-833fe5bdee449b04afe8844774be66374e1baf9c.zip
Merge branch 'obsd-master'
Conflicts: cmd-pipe-pane.c
Diffstat (limited to 'cmd-new-session.c')
-rw-r--r--cmd-new-session.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/cmd-new-session.c b/cmd-new-session.c
index e244f885..ec292fa8 100644
--- a/cmd-new-session.c
+++ b/cmd-new-session.c
@@ -119,8 +119,8 @@ cmd_new_session_exec(struct cmd *self, struct cmd_q *cmdq)
/* Get the new session working directory. */
if (args_has(args, 'c')) {
ft = format_create();
- if ((c0 = cmd_find_client(cmdq, NULL, 1)) != NULL)
- format_client(ft, c0);
+ format_defaults(ft, cmd_find_client(cmdq, NULL, 1), NULL, NULL,
+ NULL);
cp = format_expand(ft, args_get(args, 'c'));
format_free(ft);
@@ -287,9 +287,8 @@ cmd_new_session_exec(struct cmd *self, struct cmd_q *cmdq)
template = NEW_SESSION_TEMPLATE;
ft = format_create();
- if ((c0 = cmd_find_client(cmdq, NULL, 1)) != NULL)
- format_client(ft, c0);
- format_session(ft, s);
+ format_defaults(ft, cmd_find_client(cmdq, NULL, 1), s, NULL,
+ NULL);
cp = format_expand(ft, template);
cmdq_print(cmdq, "%s", cp);