aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--degesch.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/degesch.c b/degesch.c
index 8cba5da..d3e31a8 100644
--- a/degesch.c
+++ b/degesch.c
@@ -321,17 +321,15 @@ input_rl_set_prompt (void *input, char *prompt)
struct input_rl *self = input;
cstr_set (&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 void