summaryrefslogtreecommitdiffstats
path: root/status.c
diff options
context:
space:
mode:
authornicm <nicm>2020-05-16 16:16:07 +0000
committernicm <nicm>2020-05-16 16:16:07 +0000
commitc914abfa19938fe0e41941879649b7a40e192082 (patch)
tree54b011ea618aeb84835cf64a937a08c74f846b5d /status.c
parent72984c48347ddfd1d435f8a9ffcdf334c4b28389 (diff)
Expand target from client and use it to expand the prompt.
Diffstat (limited to 'status.c')
-rw-r--r--status.c11
1 files changed, 7 insertions, 4 deletions
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 = "";