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.
This commit is contained in:
nicm
2017-05-03 05:53:34 +00:00
parent 0ccfb61bb0
commit ca6a121e63
5 changed files with 24 additions and 1 deletions

View File

@ -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);
}