summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/status.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2009-09-23 14:42:49 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2009-09-23 14:42:49 +0000
commitd192cf8ad7d3f05d9716c5f8cc3c80f6290c840a (patch)
tree77419bcfe60df94746cb3cc303b5f09f33bac5a5 /usr.bin/tmux/status.c
parent1e779661e3652c409bf3b588d848c7dfdeab36d3 (diff)
Remove PROMPT_HIDDEN code which is now unused.
Diffstat (limited to 'usr.bin/tmux/status.c')
-rw-r--r--usr.bin/tmux/status.c27
1 files changed, 6 insertions, 21 deletions
diff --git a/usr.bin/tmux/status.c b/usr.bin/tmux/status.c
index af32c3453c0..a9d5d74ddf8 100644
--- a/usr.bin/tmux/status.c
+++ b/usr.bin/tmux/status.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: status.c,v 1.35 2009/09/23 06:18:48 nicm Exp $ */
+/* $OpenBSD: status.c,v 1.36 2009/09/23 14:42:48 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -673,8 +673,6 @@ 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;
@@ -739,26 +737,17 @@ status_prompt_redraw(struct client *c)
left--;
size = left;
}
- if (c->prompt_flags & PROMPT_HIDDEN)
- size = 0;
- else {
- screen_write_puts(&ctx, &gc,
- "%.*s", (int) left, c->prompt_buffer + off);
- }
+ screen_write_puts(
+ &ctx, &gc, "%.*s", (int) left, c->prompt_buffer + off);
for (i = len + size; i < c->tty.sx; i++)
screen_write_putc(&ctx, &gc, ' ');
/* Draw a fake cursor. */
ch = ' ';
- if (c->prompt_flags & PROMPT_HIDDEN)
- screen_write_cursormove(&ctx, len, 0);
- else {
- screen_write_cursormove(&ctx,
- len + c->prompt_index - off, 0);
- if (c->prompt_index < strlen(c->prompt_buffer))
- ch = c->prompt_buffer[c->prompt_index];
- }
+ screen_write_cursormove(&ctx, len + c->prompt_index - off, 0);
+ if (c->prompt_index < strlen(c->prompt_buffer))
+ ch = c->prompt_buffer[c->prompt_index];
gc.attr ^= GRID_ATTR_REVERSE;
screen_write_putc(&ctx, &gc, ch);
}
@@ -892,8 +881,6 @@ status_prompt_key(struct client *c, int key)
case MODEKEYEDIT_HISTORYUP:
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,
@@ -905,8 +892,6 @@ status_prompt_key(struct client *c, int key)
c->flags |= CLIENT_STATUS;
break;
case MODEKEYEDIT_HISTORYDOWN:
- if (c->prompt_flags & PROMPT_HIDDEN)
- memset(c->prompt_buffer, 0, strlen(c->prompt_buffer));
xfree(c->prompt_buffer);
if (c->prompt_hindex != 0) {