aboutsummaryrefslogtreecommitdiff
path: root/cmd-show-options.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2020-04-13 14:01:45 +0100
committerThomas Adam <thomas@xteddy.org>2020-04-13 14:01:45 +0100
commit8f2b5d714a9f854c9583cab8bae70a2c7323fa00 (patch)
tree4e887ff4a1fcb3703fb0a1fcaa751183cff24c12 /cmd-show-options.c
parentb117c3b81217a11946ac784cfbe2ef1f3725b207 (diff)
parent04cdd035250b93b728678d515b69690653dced4e (diff)
downloadrtmux-8f2b5d714a9f854c9583cab8bae70a2c7323fa00.tar.gz
rtmux-8f2b5d714a9f854c9583cab8bae70a2c7323fa00.tar.bz2
rtmux-8f2b5d714a9f854c9583cab8bae70a2c7323fa00.zip
Merge branch 'obsd-master'
Diffstat (limited to 'cmd-show-options.c')
-rw-r--r--cmd-show-options.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/cmd-show-options.c b/cmd-show-options.c
index 15368d69..04374736 100644
--- a/cmd-show-options.c
+++ b/cmd-show-options.c
@@ -77,10 +77,8 @@ static enum cmd_retval
cmd_show_options_exec(struct cmd *self, struct cmdq_item *item)
{
struct args *args = cmd_get_args(self);
- struct cmd_find_state *fs = &item->target;
+ struct cmd_find_state *target = cmdq_get_target(item);
struct client *c = cmd_find_client(item, NULL, 1);
- struct session *s = item->target.s;
- struct winlink *wl = item->target.wl;
struct options *oo;
char *argument, *name = NULL, *cause;
int window, idx, ambiguous, parent, scope;
@@ -89,7 +87,8 @@ cmd_show_options_exec(struct cmd *self, struct cmdq_item *item)
window = (cmd_get_entry(self) == &cmd_show_window_options_entry);
if (args->argc == 0) {
- scope = options_scope_from_flags(args, window, fs, &oo, &cause);
+ scope = options_scope_from_flags(args, window, target, &oo,
+ &cause);
if (scope == OPTIONS_TABLE_NONE) {
if (args_has(args, 'q'))
return (CMD_RETURN_NORMAL);
@@ -99,7 +98,7 @@ cmd_show_options_exec(struct cmd *self, struct cmdq_item *item)
}
return (cmd_show_options_all(self, item, scope, oo));
}
- argument = format_single(item, args->argv[0], c, s, wl, NULL);
+ argument = format_single_from_target(item, args->argv[0], c);
name = options_match(argument, &idx, &ambiguous);
if (name == NULL) {
@@ -111,7 +110,8 @@ cmd_show_options_exec(struct cmd *self, struct cmdq_item *item)
cmdq_error(item, "invalid option: %s", argument);
goto fail;
}
- 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 fail;