diff options
author | 2020-05-16 16:16:07 +0000 | |
---|---|---|
committer | 2020-05-16 16:16:07 +0000 | |
commit | 94adf770415cb803237af9a844544f2da66f1f98 (patch) | |
tree | 44ced233d9768929dc89d5ec0752a7bd6a908ad2 /usr.bin/tmux/cmd-command-prompt.c | |
parent | Move editor stuff to common code in popup.c. (diff) | |
download | wireguard-openbsd-94adf770415cb803237af9a844544f2da66f1f98.tar.xz wireguard-openbsd-94adf770415cb803237af9a844544f2da66f1f98.zip |
Expand target from client and use it to expand the prompt.
Diffstat (limited to 'usr.bin/tmux/cmd-command-prompt.c')
-rw-r--r-- | usr.bin/tmux/cmd-command-prompt.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/tmux/cmd-command-prompt.c b/usr.bin/tmux/cmd-command-prompt.c index 0a78ae8854c..aa69fbc8b57 100644 --- a/usr.bin/tmux/cmd-command-prompt.c +++ b/usr.bin/tmux/cmd-command-prompt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-command-prompt.c,v 1.52 2020/05/16 15:16:36 nicm Exp $ */ +/* $OpenBSD: cmd-command-prompt.c,v 1.53 2020/05/16 16:16:07 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -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); |