Readline: fix a dormant bug in prompt changes
For details, see a similar change in degesch from uirc3.
This commit is contained in:
parent
710f5f197f
commit
b315892249
|
@ -360,16 +360,14 @@ input_rl_set_prompt (struct input *input, char *prompt)
|
||||||
free (self->prompt);
|
free (self->prompt);
|
||||||
self->prompt = prompt;
|
self->prompt = prompt;
|
||||||
|
|
||||||
if (!self->active)
|
if (!self->active || self->prompt_shown <= 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// First reset the prompt to work around a bug in readline
|
// First reset the prompt to work around a bug in readline
|
||||||
rl_set_prompt ("");
|
rl_set_prompt ("");
|
||||||
if (self->prompt_shown > 0)
|
|
||||||
rl_redisplay ();
|
rl_redisplay ();
|
||||||
|
|
||||||
rl_set_prompt (self->prompt);
|
rl_set_prompt (self->prompt);
|
||||||
if (self->prompt_shown > 0)
|
|
||||||
rl_redisplay ();
|
rl_redisplay ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue