From 04cdd035250b93b728678d515b69690653dced4e Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 13 Apr 2020 10:59:58 +0000 Subject: 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). --- cmd-set-option.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'cmd-set-option.c') diff --git a/cmd-set-option.c b/cmd-set-option.c index 041f109b..4e81dc5e 100644 --- a/cmd-set-option.c +++ b/cmd-set-option.c @@ -83,10 +83,9 @@ cmd_set_option_exec(struct cmd *self, struct cmdq_item *item) { struct args *args = cmd_get_args(self); int append = args_has(args, 'a'); - struct cmd_find_state *fs = &item->target; + struct cmd_find_state *target = cmdq_get_target(item); struct client *c, *loop; - struct session *s = fs->s; - struct winlink *wl = fs->wl; + struct session *s = target->s; struct window *w; struct window_pane *wp; struct options *oo; @@ -100,7 +99,7 @@ cmd_set_option_exec(struct cmd *self, struct cmdq_item *item) /* Expand argument. */ c = cmd_find_client(item, NULL, 1); - argument = format_single(item, args->argv[0], c, s, wl, NULL); + argument = format_single_from_target(item, args->argv[0], c); /* If set-hook -R, fire the hook straight away. */ if (cmd_get_entry(self) == &cmd_set_hook_entry && args_has(args, 'R')) { @@ -123,12 +122,13 @@ cmd_set_option_exec(struct cmd *self, struct cmdq_item *item) if (args->argc < 2) value = NULL; else if (args_has(args, 'F')) - value = format_single(item, args->argv[1], c, s, wl, NULL); + value = format_single_from_target(item, args->argv[1], c); else value = xstrdup(args->argv[1]); /* Get the scope and table for the option .*/ - scope = options_scope_from_name(args, window, name, fs, &oo, &cause); + scope = options_scope_from_name(args, window, name, target, &oo, + &cause); if (scope == OPTIONS_TABLE_NONE) { if (args_has(args, 'q')) goto out; -- cgit v1.2.3