diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2012-02-02 00:10:13 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2012-02-02 00:10:13 +0000 |
commit | 2d59c80f99b87389c62a2affa426de4f5dec264d (patch) | |
tree | c3e8c0d2d68ad074ff361887ab83970d1732edd5 /usr.bin/tmux/cmd-rename-window.c | |
parent | 398a7f0354efefb140cc6cb2c9c3f621d2e6dfae (diff) |
Move window name changes into wrapper function window_set_name, from
George Nachman.
Diffstat (limited to 'usr.bin/tmux/cmd-rename-window.c')
-rw-r--r-- | usr.bin/tmux/cmd-rename-window.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.bin/tmux/cmd-rename-window.c b/usr.bin/tmux/cmd-rename-window.c index e6344a7f070..3e96d827184 100644 --- a/usr.bin/tmux/cmd-rename-window.c +++ b/usr.bin/tmux/cmd-rename-window.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-rename-window.c,v 1.6 2011/01/04 00:42:47 nicm Exp $ */ +/* $OpenBSD: cmd-rename-window.c,v 1.7 2012/02/02 00:10:12 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -48,8 +48,7 @@ cmd_rename_window_exec(struct cmd *self, struct cmd_ctx *ctx) if ((wl = cmd_find_window(ctx, args_get(args, 't'), &s)) == NULL) return (-1); - xfree(wl->window->name); - wl->window->name = xstrdup(args->argv[0]); + window_set_name(wl->window, args->argv[0]); options_set_number(&wl->window->options, "automatic-rename", 0); server_status_window(wl->window); |