aboutsummaryrefslogtreecommitdiff
path: root/cmd-break-pane.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2017-03-08 14:01:23 +0000
committerThomas Adam <thomas@xteddy.org>2017-03-08 14:01:23 +0000
commit3ea36830f38eed2d6dad6cb057b3efe772237d5e (patch)
treedad4d842a60527c85e904f63c3e29c596629f4d4 /cmd-break-pane.c
parent5d3296c53b820664d50d96b2b926f2c2c1105e97 (diff)
parent6b2009ad725b662853b8e94aee233fabdc5490f9 (diff)
downloadrtmux-3ea36830f38eed2d6dad6cb057b3efe772237d5e.tar.gz
rtmux-3ea36830f38eed2d6dad6cb057b3efe772237d5e.tar.bz2
rtmux-3ea36830f38eed2d6dad6cb057b3efe772237d5e.zip
Merge branch 'obsd-master'
Diffstat (limited to 'cmd-break-pane.c')
-rw-r--r--cmd-break-pane.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/cmd-break-pane.c b/cmd-break-pane.c
index fdefeb17..3c564a0c 100644
--- a/cmd-break-pane.c
+++ b/cmd-break-pane.c
@@ -48,6 +48,7 @@ static enum cmd_retval
cmd_break_pane_exec(struct cmd *self, struct cmdq_item *item)
{
struct args *args = self->args;
+ struct client *c = item->state.c;
struct winlink *wl = item->state.sflag.wl;
struct session *src_s = item->state.sflag.s;
struct session *dst_s = item->state.tflag.s;
@@ -55,7 +56,6 @@ cmd_break_pane_exec(struct cmd *self, struct cmdq_item *item)
struct window *w = wl->window;
char *name, *cause;
int idx = item->state.tflag.idx;
- struct format_tree *ft;
const char *template;
char *cp;
@@ -106,15 +106,9 @@ cmd_break_pane_exec(struct cmd *self, struct cmdq_item *item)
if (args_has(args, 'P')) {
if ((template = args_get(args, 'F')) == NULL)
template = BREAK_PANE_TEMPLATE;
-
- ft = format_create(item, FORMAT_NONE, 0);
- format_defaults(ft, item->state.c, dst_s, wl, wp);
-
- cp = format_expand(ft, template);
+ cp = format_single(item, template, c, dst_s, wl, wp);
cmdq_print(item, "%s", cp);
free(cp);
-
- format_free(ft);
}
return (CMD_RETURN_NORMAL);
}