summaryrefslogtreecommitdiffstats
path: root/cmd-new-session.c
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2012-02-02 02:00:12 +0000
committerTiago Cunha <tcunha@gmx.com>2012-02-02 02:00:12 +0000
commitc82e06804e41af6b13b3a75e0268f32fbc4a4210 (patch)
tree2af7a371354718d62479662a3519c117f6344ea4 /cmd-new-session.c
parent509a7e8b73e6ed60ceb579cead2f073307120927 (diff)
Sync OpenBSD patchset 1024:
Move window name changes into wrapper function window_set_name, from George Nachman.
Diffstat (limited to 'cmd-new-session.c')
-rw-r--r--cmd-new-session.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/cmd-new-session.c b/cmd-new-session.c
index 774df7db..3604bdbb 100644
--- a/cmd-new-session.c
+++ b/cmd-new-session.c
@@ -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);
}