1
0
mirror of https://github.com/openbsd/src.git synced 2026-04-24 22:26:03 +00:00

Use new window and new pane as well for -P to new-session or new-window.

This commit is contained in:
nicm
2020-04-03 13:54:31 +00:00
parent 658ca82c36
commit c8713798a0
2 changed files with 5 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
/* $OpenBSD: cmd-new-session.c,v 1.122 2019/11/14 08:00:30 nicm Exp $ */
/* $OpenBSD: cmd-new-session.c,v 1.123 2020/04/03 13:54:31 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -334,7 +334,7 @@ cmd_new_session_exec(struct cmd *self, struct cmdq_item *item)
if (args_has(args, 'P')) {
if ((template = args_get(args, 'F')) == NULL)
template = NEW_SESSION_TEMPLATE;
cp = format_single(item, template, c, s, NULL, NULL);
cp = format_single(item, template, c, s, s->curw, NULL);
cmdq_print(item, "%s", cp);
free(cp);
}

View File

@@ -1,4 +1,4 @@
/* $OpenBSD: cmd-new-window.c,v 1.81 2020/03/31 17:14:40 nicm Exp $ */
/* $OpenBSD: cmd-new-window.c,v 1.82 2020/04/03 13:54:31 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -108,7 +108,8 @@ cmd_new_window_exec(struct cmd *self, struct cmdq_item *item)
if (args_has(args, 'P')) {
if ((template = args_get(args, 'F')) == NULL)
template = NEW_WINDOW_TEMPLATE;
cp = format_single(item, template, c, s, new_wl, NULL);
cp = format_single(item, template, c, s, new_wl,
new_wl->window->active);
cmdq_print(item, "%s", cp);
free(cp);
}