aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--json-rpc-shell.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/json-rpc-shell.c b/json-rpc-shell.c
index 94baaf9..7e7be25 100644
--- a/json-rpc-shell.c
+++ b/json-rpc-shell.c
@@ -360,17 +360,15 @@ input_rl_set_prompt (struct input *input, char *prompt)
free (self->prompt);
self->prompt = prompt;
- if (!self->active)
+ if (!self->active || self->prompt_shown <= 0)
return;
// First reset the prompt to work around a bug in readline
rl_set_prompt ("");
- if (self->prompt_shown > 0)
- rl_redisplay ();
+ rl_redisplay ();
rl_set_prompt (self->prompt);
- if (self->prompt_shown > 0)
- rl_redisplay ();
+ rl_redisplay ();
}
static bool