aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2009-09-25 17:45:46 +0000
committerTiago Cunha <tcunha@gmx.com>2009-09-25 17:45:46 +0000
commitb5d23ef38b6fb3483caeead4baf1f0c34aa1292c (patch)
tree75de24188253787fa35105f0da6a9eaa63c55f41
parentc190a65c69a67d479792cfe001a51b1b9721dadc (diff)
downloadrtmux-b5d23ef38b6fb3483caeead4baf1f0c34aa1292c.tar.gz
rtmux-b5d23ef38b6fb3483caeead4baf1f0c34aa1292c.tar.bz2
rtmux-b5d23ef38b6fb3483caeead4baf1f0c34aa1292c.zip
Sync OpenBSD patchset 351:
Remove PROMPT_HIDDEN code which is now unused.
-rw-r--r--status.c27
-rw-r--r--tmux.h5
2 files changed, 8 insertions, 24 deletions
diff --git a/status.c b/status.c
index c630bf86..7f4f31e1 100644
--- a/status.c
+++ b/status.c
@@ -1,4 +1,4 @@
-/* $Id: status.c,v 1.120 2009-09-23 15:00:09 tcunha Exp $ */
+/* $Id: status.c,v 1.121 2009-09-25 17:45:46 tcunha 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) {
diff --git a/tmux.h b/tmux.h
index 3c1f26b9..46194a43 100644
--- a/tmux.h
+++ b/tmux.h
@@ -1,4 +1,4 @@
-/* $Id: tmux.h,v 1.454 2009-09-23 15:18:56 tcunha Exp $ */
+/* $Id: tmux.h,v 1.455 2009-09-25 17:45:46 tcunha Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -956,8 +956,7 @@ struct client {
void (*prompt_freefn)(void *);
void *prompt_data;
-#define PROMPT_HIDDEN 0x1
-#define PROMPT_SINGLE 0x2
+#define PROMPT_SINGLE 0x1
int prompt_flags;
u_int prompt_hindex;