summaryrefslogtreecommitdiffstats
path: root/cmd-set-option.c
diff options
context:
space:
mode:
authornicm <nicm>2020-04-13 10:59:58 +0000
committernicm <nicm>2020-04-13 10:59:58 +0000
commit04cdd035250b93b728678d515b69690653dced4e (patch)
tree34edc5f4affb9a640a95c7d531eb06770b6ea3c9 /cmd-set-option.c
parentc20eb0c0ae3347c768894a6355adfd7ebae6f2f3 (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 'cmd-set-option.c')
-rw-r--r--cmd-set-option.c12
1 files changed, 6 insertions, 6 deletions
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;