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

@ -217,8 +217,7 @@ cmd_new_session_exec(struct cmd *self, struct cmd_ctx *ctx)
if (cmd != NULL && args_has(args, 'n')) {
w = s->curw->window;
xfree(w->name);
w->name = xstrdup(args_get(args, 'n'));
window_set_name(w, args_get(args, 'n'));
options_set_number(&w->options, "automatic-rename", 0);
}