mirror of
https://github.com/tmate-io/tmate.git
synced 2025-02-02 19:39:32 +01:00
Remove PROMPT_HIDDEN code which is now unused.
This commit is contained in:
parent
9200a0be7a
commit
fecf8dc44e
25
status.c
25
status.c
@ -673,8 +673,6 @@ status_prompt_clear(struct client *c)
|
|||||||
xfree(c->prompt_string);
|
xfree(c->prompt_string);
|
||||||
c->prompt_string = NULL;
|
c->prompt_string = NULL;
|
||||||
|
|
||||||
if (c->prompt_flags & PROMPT_HIDDEN)
|
|
||||||
memset(c->prompt_buffer, 0, strlen(c->prompt_buffer));
|
|
||||||
xfree(c->prompt_buffer);
|
xfree(c->prompt_buffer);
|
||||||
c->prompt_buffer = NULL;
|
c->prompt_buffer = NULL;
|
||||||
|
|
||||||
@ -739,26 +737,17 @@ status_prompt_redraw(struct client *c)
|
|||||||
left--;
|
left--;
|
||||||
size = left;
|
size = left;
|
||||||
}
|
}
|
||||||
if (c->prompt_flags & PROMPT_HIDDEN)
|
screen_write_puts(
|
||||||
size = 0;
|
&ctx, &gc, "%.*s", (int) left, c->prompt_buffer + off);
|
||||||
else {
|
|
||||||
screen_write_puts(&ctx, &gc,
|
|
||||||
"%.*s", (int) left, c->prompt_buffer + off);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i = len + size; i < c->tty.sx; i++)
|
for (i = len + size; i < c->tty.sx; i++)
|
||||||
screen_write_putc(&ctx, &gc, ' ');
|
screen_write_putc(&ctx, &gc, ' ');
|
||||||
|
|
||||||
/* Draw a fake cursor. */
|
/* Draw a fake cursor. */
|
||||||
ch = ' ';
|
ch = ' ';
|
||||||
if (c->prompt_flags & PROMPT_HIDDEN)
|
screen_write_cursormove(&ctx, len + c->prompt_index - off, 0);
|
||||||
screen_write_cursormove(&ctx, len, 0);
|
if (c->prompt_index < strlen(c->prompt_buffer))
|
||||||
else {
|
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;
|
gc.attr ^= GRID_ATTR_REVERSE;
|
||||||
screen_write_putc(&ctx, &gc, ch);
|
screen_write_putc(&ctx, &gc, ch);
|
||||||
}
|
}
|
||||||
@ -892,8 +881,6 @@ status_prompt_key(struct client *c, int key)
|
|||||||
case MODEKEYEDIT_HISTORYUP:
|
case MODEKEYEDIT_HISTORYUP:
|
||||||
if (ARRAY_LENGTH(&c->prompt_hdata) == 0)
|
if (ARRAY_LENGTH(&c->prompt_hdata) == 0)
|
||||||
break;
|
break;
|
||||||
if (c->prompt_flags & PROMPT_HIDDEN)
|
|
||||||
memset(c->prompt_buffer, 0, strlen(c->prompt_buffer));
|
|
||||||
xfree(c->prompt_buffer);
|
xfree(c->prompt_buffer);
|
||||||
|
|
||||||
c->prompt_buffer = xstrdup(ARRAY_ITEM(&c->prompt_hdata,
|
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;
|
c->flags |= CLIENT_STATUS;
|
||||||
break;
|
break;
|
||||||
case MODEKEYEDIT_HISTORYDOWN:
|
case MODEKEYEDIT_HISTORYDOWN:
|
||||||
if (c->prompt_flags & PROMPT_HIDDEN)
|
|
||||||
memset(c->prompt_buffer, 0, strlen(c->prompt_buffer));
|
|
||||||
xfree(c->prompt_buffer);
|
xfree(c->prompt_buffer);
|
||||||
|
|
||||||
if (c->prompt_hindex != 0) {
|
if (c->prompt_hindex != 0) {
|
||||||
|
3
tmux.h
3
tmux.h
@ -958,8 +958,7 @@ struct client {
|
|||||||
void (*prompt_freefn)(void *);
|
void (*prompt_freefn)(void *);
|
||||||
void *prompt_data;
|
void *prompt_data;
|
||||||
|
|
||||||
#define PROMPT_HIDDEN 0x1
|
#define PROMPT_SINGLE 0x1
|
||||||
#define PROMPT_SINGLE 0x2
|
|
||||||
int prompt_flags;
|
int prompt_flags;
|
||||||
|
|
||||||
u_int prompt_hindex;
|
u_int prompt_hindex;
|
||||||
|
Loading…
Reference in New Issue
Block a user