Move window name changes into wrapper function window_set_name, from

George Nachman.
This commit is contained in:
Nicholas Marriott
2012-02-02 00:10:11 +00:00
parent fdeaa73342
commit 8363d19307
6 changed files with 16 additions and 7 deletions

View File

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