Sync OpenBSD patchset 1024:

Move window name changes into wrapper function window_set_name, from
George Nachman.
This commit is contained in:
Tiago Cunha
2012-02-02 02:00:12 +00:00
parent 509a7e8b73
commit c82e06804e
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");