version 1.187, 2019/03/16 17:14:07 |
version 1.188, 2019/03/16 17:53:55 |
|
|
|
|
/* Save as old status line. */ |
/* Save as old status line. */ |
static void |
static void |
status_save_old(struct status_line *sl) |
status_save_old(struct client *c) |
{ |
{ |
|
struct status_line *sl = &c->status; |
|
|
if (sl->old_screen == NULL) { |
if (sl->old_screen == NULL) { |
sl->old_screen = xmalloc(sizeof *sl->old_screen); |
sl->old_screen = xmalloc(sizeof *sl->old_screen); |
memcpy(sl->old_screen, &sl->screen, sizeof *sl->old_screen); |
memcpy(sl->old_screen, &sl->screen, sizeof *sl->old_screen); |
|
screen_init(&c->status.screen, c->tty.sx, 1, 0); |
} |
} |
} |
} |
|
|
/* Free old status line. */ |
/* Free old status line. */ |
static void |
static void |
status_free_old(struct status_line *sl) |
status_free_old(struct client *c) |
{ |
{ |
|
struct status_line *sl = &c->status; |
|
|
if (sl->old_screen != NULL) { |
if (sl->old_screen != NULL) { |
screen_free(sl->old_screen); |
screen_free(sl->old_screen); |
free(sl->old_screen); |
free(sl->old_screen); |
|
|
int larrow, rarrow; |
int larrow, rarrow; |
|
|
/* Delete the saved status line, if any. */ |
/* Delete the saved status line, if any. */ |
status_free_old(sl); |
status_free_old(c); |
|
|
/* No status line? */ |
/* No status line? */ |
lines = status_line_size(c); |
lines = status_line_size(c); |
|
|
int delay; |
int delay; |
|
|
status_message_clear(c); |
status_message_clear(c); |
|
status_save_old(c); |
|
|
status_save_old(&c->status); |
|
screen_init(&c->status.screen, 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); |
|
status_save_old(c); |
status_save_old(&c->status); |
|
screen_init(&c->status.screen, c->tty.sx, 1, 0); |
|
|
|
c->prompt_string = format_expand_time(ft, msg); |
c->prompt_string = format_expand_time(ft, msg); |
|
|