diff options
author | nicm <nicm> | 2017-05-03 05:53:34 +0000 |
---|---|---|
committer | nicm <nicm> | 2017-05-03 05:53:34 +0000 |
commit | ca6a121e63c61eb45a81dc7318ed290b8dca45e6 (patch) | |
tree | 90de542bf8acb9d98d32b4f9b1d172c1fc264739 /status.c | |
parent | 0ccfb61bb0e0beb5fe76b64e30637de7d9f696c7 (diff) |
Add a format for the last search string in copy mode and fix the prompt
so it can work when in -I, suggested by Suraj N Kurapati.
Diffstat (limited to 'status.c')
-rw-r--r-- | status.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -661,7 +661,7 @@ status_prompt_set(struct client *c, const char *msg, const char *input, { struct format_tree *ft; time_t t; - char *tmp; + char *tmp, *cp; ft = format_create(c, NULL, FORMAT_NONE, 0); format_defaults(ft, c, NULL, NULL, NULL); @@ -690,6 +690,12 @@ status_prompt_set(struct client *c, const char *msg, const char *input, c->tty.flags |= (TTY_NOCURSOR|TTY_FREEZE); c->flags |= CLIENT_STATUS; + if ((flags & PROMPT_INCREMENTAL) && *tmp != '\0') { + xasprintf(&cp, "=%s", tmp); + c->prompt_callbackfn(c->prompt_data, cp, 0); + free(cp); + } + free(tmp); format_free(ft); } |