diff options
author | nicm <nicm> | 2020-05-16 16:16:07 +0000 |
---|---|---|
committer | nicm <nicm> | 2020-05-16 16:16:07 +0000 |
commit | c914abfa19938fe0e41941879649b7a40e192082 (patch) | |
tree | 54b011ea618aeb84835cf64a937a08c74f846b5d /cmd-command-prompt.c | |
parent | 72984c48347ddfd1d435f8a9ffcdf334c4b28389 (diff) | |
download | rtmux-c914abfa19938fe0e41941879649b7a40e192082.tar.gz rtmux-c914abfa19938fe0e41941879649b7a40e192082.tar.bz2 rtmux-c914abfa19938fe0e41941879649b7a40e192082.zip |
Expand target from client and use it to expand the prompt.
Diffstat (limited to 'cmd-command-prompt.c')
-rw-r--r-- | cmd-command-prompt.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cmd-command-prompt.c b/cmd-command-prompt.c index b8e3bd5c..c82235c5 100644 --- a/cmd-command-prompt.c +++ b/cmd-command-prompt.c @@ -66,6 +66,7 @@ cmd_command_prompt_exec(struct cmd *self, struct cmdq_item *item) { struct args *args = cmd_get_args(self); struct client *tc = cmdq_get_target_client(item); + struct cmd_find_state *target = cmdq_get_target(item); const char *inputs, *prompts; struct cmd_command_prompt_cdata *cdata; char *prompt, *ptr, *input = NULL; @@ -125,8 +126,9 @@ cmd_command_prompt_exec(struct cmd *self, struct cmdq_item *item) cdata->flags |= PROMPT_WINDOW; else if (args_has(args, 'T')) cdata->flags |= PROMPT_TARGET; - status_prompt_set(tc, prompt, input, cmd_command_prompt_callback, - cmd_command_prompt_free, cdata, cdata->flags); + status_prompt_set(tc, target, prompt, input, + cmd_command_prompt_callback, cmd_command_prompt_free, cdata, + cdata->flags); free(prompt); return (CMD_RETURN_NORMAL); |