aboutsummaryrefslogtreecommitdiff
path: root/status.c
diff options
context:
space:
mode:
Diffstat (limited to 'status.c')
-rw-r--r--status.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/status.c b/status.c
index dae0d5c4..98061dd0 100644
--- a/status.c
+++ b/status.c
@@ -597,6 +597,8 @@ status_prompt_clear(struct client *c)
xfree(c->prompt_string);
c->prompt_string = NULL;
+ if (c->prompt_flags & PROMPT_HIDDEN)
+ memset(c->prompt_buffer, 0, strlen(c->prompt_buffer));
xfree(c->prompt_buffer);
c->prompt_buffer = NULL;
@@ -794,6 +796,8 @@ status_prompt_key(struct client *c, int key)
if (ARRAY_LENGTH(&c->prompt_hdata) == 0)
break;
+ if (c->prompt_flags & PROMPT_HIDDEN)
+ memset(c->prompt_buffer, 0, strlen(c->prompt_buffer));
xfree(c->prompt_buffer);
c->prompt_buffer = xstrdup(ARRAY_ITEM(&c->prompt_hdata,
@@ -808,6 +812,8 @@ status_prompt_key(struct client *c, int key)
if (server_locked)
break;
+ if (c->prompt_flags & PROMPT_HIDDEN)
+ memset(c->prompt_buffer, 0, strlen(c->prompt_buffer));
xfree(c->prompt_buffer);
if (c->prompt_hindex != 0) {