summaryrefslogtreecommitdiffstats
path: root/cmd-break-pane.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2012-02-02 00:10:11 +0000
committerNicholas Marriott <nicm@openbsd.org>2012-02-02 00:10:11 +0000
commit8363d19307c476f6434a91b79fd962814f6acc1a (patch)
treefb938ccef2efe05bd74e4569241bf38c255a1afe /cmd-break-pane.c
parentfdeaa73342dc92bd8b0119461b6b38e38d495ffc (diff)
Move window name changes into wrapper function window_set_name, from
George Nachman.
Diffstat (limited to 'cmd-break-pane.c')
-rw-r--r--cmd-break-pane.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/cmd-break-pane.c b/cmd-break-pane.c
index f6663149..6e455ab9 100644
--- a/cmd-break-pane.c
+++ b/cmd-break-pane.c
@@ -46,6 +46,7 @@ cmd_break_pane_exec(struct cmd *self, struct cmd_ctx *ctx)
struct session *s;
struct window_pane *wp;
struct window *w;
+ char *name;
char *cause;
int base_idx;
@@ -74,7 +75,9 @@ cmd_break_pane_exec(struct cmd *self, struct cmd_ctx *ctx)
w = wp->window = window_create1(s->sx, s->sy);
TAILQ_INSERT_HEAD(&w->panes, wp, entry);
w->active = wp;
- w->name = default_window_name(w);
+ name = default_window_name(w);
+ window_set_name(w, name);
+ xfree(name);
layout_init(w);
base_idx = options_get_number(&s->options, "base-index");