version 1.166, 2017/05/17 15:20:23 |
version 1.167, 2017/05/29 20:41:29 |
|
|
size_t llen, rlen, seplen; |
size_t llen, rlen, seplen; |
int larrow, rarrow; |
int larrow, rarrow; |
|
|
|
/* Delete the saved status line, if any. */ |
|
if (c->old_status != NULL) { |
|
screen_free(c->old_status); |
|
free(c->old_status); |
|
c->old_status = NULL; |
|
} |
|
|
/* No status line? */ |
/* No status line? */ |
if (c->tty.sy == 0 || !options_get_number(s->options, "status")) |
if (c->tty.sy == 0 || !options_get_number(s->options, "status")) |
return (1); |
return (1); |
|
|
|
|
status_message_clear(c); |
status_message_clear(c); |
|
|
|
if (c->old_status == NULL) { |
|
c->old_status = xmalloc(sizeof *c->old_status); |
|
memcpy(c->old_status, &c->status, sizeof *c->old_status); |
|
screen_init(&c->status, c->tty.sx, 1, 0); |
|
} |
|
|
va_start(ap, fmt); |
va_start(ap, fmt); |
xvasprintf(&c->message_string, fmt, ap); |
xvasprintf(&c->message_string, fmt, ap); |
va_end(ap); |
va_end(ap); |
|
|
|
|
status_message_clear(c); |
status_message_clear(c); |
status_prompt_clear(c); |
status_prompt_clear(c); |
|
|
|
if (c->old_status == NULL) { |
|
c->old_status = xmalloc(sizeof *c->old_status); |
|
memcpy(c->old_status, &c->status, sizeof *c->old_status); |
|
screen_init(&c->status, c->tty.sx, 1, 0); |
|
} |
|
|
c->prompt_string = format_expand_time(ft, msg, t); |
c->prompt_string = format_expand_time(ft, msg, t); |
|
|