summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/cmd-rename-window.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2020-04-13 11:00:00 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2020-04-13 11:00:00 +0000
commit56530d4d9e327bc4c76b8b02290102a1fadfffb9 (patch)
treec902ce5f812b38436dec697a5fa08bf3615c0ed4 /usr.bin/tmux/cmd-rename-window.c
parent9947eee19da9830a3c591d7fb4574df8cdd144e6 (diff)
Also move cmdq_item and cmdq_list into cmd-queue.c (this is to make its
use more clearly defined and preparation for some future work).
Diffstat (limited to 'usr.bin/tmux/cmd-rename-window.c')
-rw-r--r--usr.bin/tmux/cmd-rename-window.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/usr.bin/tmux/cmd-rename-window.c b/usr.bin/tmux/cmd-rename-window.c
index fe029b39997..7cb8928f361 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.23 2020/04/13 08:26:27 nicm Exp $ */
+/* $OpenBSD: cmd-rename-window.c,v 1.24 2020/04/13 10:59:58 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -45,13 +45,13 @@ const struct cmd_entry cmd_rename_window_entry = {
static enum cmd_retval
cmd_rename_window_exec(struct cmd *self, struct cmdq_item *item)
{
- struct args *args = cmd_get_args(self);
- struct client *c = cmd_find_client(item, NULL, 1);
- struct session *s = item->target.s;
- struct winlink *wl = item->target.wl;
- char *newname;
+ struct args *args = cmd_get_args(self);
+ struct cmd_find_state *target = cmdq_get_target(item);
+ struct client *c = cmd_find_client(item, NULL, 1);
+ struct winlink *wl = target->wl;
+ char *newname;
- newname = format_single(item, args->argv[0], c, s, wl, NULL);
+ newname = format_single_from_target(item, args->argv[0], c);
window_set_name(wl->window, newname);
options_set_number(wl->window->options, "automatic-rename", 0);