Expand target from client and use it to expand the prompt.

This commit is contained in:
nicm
2020-05-16 16:16:07 +00:00
parent 72984c4834
commit c914abfa19
9 changed files with 36 additions and 28 deletions

View File

@ -532,14 +532,17 @@ status_message_redraw(struct client *c)
/* Enable status line prompt. */
void
status_prompt_set(struct client *c, const char *msg, const char *input,
prompt_input_cb inputcb, prompt_free_cb freecb, void *data, int flags)
status_prompt_set(struct client *c, struct cmd_find_state *fs,
const char *msg, const char *input, prompt_input_cb inputcb,
prompt_free_cb freecb, void *data, int flags)
{
struct format_tree *ft;
char *tmp, *cp;
ft = format_create(c, NULL, FORMAT_NONE, 0);
format_defaults(ft, c, NULL, NULL, NULL);
if (fs != NULL)
ft = format_create_from_state(NULL, c, fs);
else
ft = format_create_defaults(NULL, c, NULL, NULL, NULL);
if (input == NULL)
input = "";