From 17a6c01d5839f9c235d4119bea3044d77554741d Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Fri, 29 May 2009 05:40:56 +0000 Subject: [PATCH] Don't show real character under cursor when hidden. Doh. --- status.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/status.c b/status.c index da1bf83d..bd7b4d2a 100644 --- a/status.c +++ b/status.c @@ -1,4 +1,4 @@ -/* $Id: status.c,v 1.82 2009-05-19 13:32:55 tcunha Exp $ */ +/* $Id: status.c,v 1.83 2009-05-29 05:40:56 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -658,8 +658,12 @@ status_prompt_redraw(struct client *c) screen_write_cursormove(&ctx, len + c->prompt_index - offset, 0); if (c->prompt_index == strlen(c->prompt_buffer)) ch = ' '; - else - ch = c->prompt_buffer[c->prompt_index]; + else { + if (c->prompt_flags & PROMPT_HIDDEN) + ch = '*'; + else + ch = c->prompt_buffer[c->prompt_index]; + } if (ch == '\0') ch = ' '; gc.attr ^= GRID_ATTR_REVERSE;