diff options
author | Thomas Adam <thomas@xteddy.org> | 2020-04-13 14:01:45 +0100 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2020-04-13 14:01:45 +0100 |
commit | 8f2b5d714a9f854c9583cab8bae70a2c7323fa00 (patch) | |
tree | 4e887ff4a1fcb3703fb0a1fcaa751183cff24c12 /cmd-set-option.c | |
parent | b117c3b81217a11946ac784cfbe2ef1f3725b207 (diff) | |
parent | 04cdd035250b93b728678d515b69690653dced4e (diff) | |
download | rtmux-8f2b5d714a9f854c9583cab8bae70a2c7323fa00.tar.gz rtmux-8f2b5d714a9f854c9583cab8bae70a2c7323fa00.tar.bz2 rtmux-8f2b5d714a9f854c9583cab8bae70a2c7323fa00.zip |
Merge branch 'obsd-master'
Diffstat (limited to 'cmd-set-option.c')
-rw-r--r-- | cmd-set-option.c | 12 |
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; |