From 12eceaf2b3ef2b028a55d8ad11951be700be0446 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Thu, 14 May 2020 10:35:26 +0100 Subject: Expand target from client and use it to expand the prompt. --- status.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'status.c') diff --git a/status.c b/status.c index b5fa0824..56af02f5 100644 --- a/status.c +++ b/status.c @@ -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 = ""; -- cgit