mirror of
https://github.com/tmux/tmux.git
synced 2025-01-12 11:18:48 +00:00
Use format for status-style.
This commit is contained in:
parent
66bab1f6cf
commit
272f3dbf2e
16
status.c
16
status.c
@ -346,8 +346,15 @@ status_redraw(struct client *c)
|
|||||||
if (c->tty.sy == 0 || lines == 0)
|
if (c->tty.sy == 0 || lines == 0)
|
||||||
return (1);
|
return (1);
|
||||||
|
|
||||||
|
/* Create format tree. */
|
||||||
|
flags = FORMAT_STATUS;
|
||||||
|
if (c->flags & CLIENT_STATUSFORCE)
|
||||||
|
flags |= FORMAT_FORCE;
|
||||||
|
ft = format_create(c, NULL, FORMAT_NONE, flags);
|
||||||
|
format_defaults(ft, c, NULL, NULL, NULL);
|
||||||
|
|
||||||
/* Set up default colour. */
|
/* Set up default colour. */
|
||||||
style_apply(&gc, s->options, "status-style", NULL);
|
style_apply(&gc, s->options, "status-style", ft);
|
||||||
fg = options_get_number(s->options, "status-fg");
|
fg = options_get_number(s->options, "status-fg");
|
||||||
if (fg != 8)
|
if (fg != 8)
|
||||||
gc.fg = fg;
|
gc.fg = fg;
|
||||||
@ -367,13 +374,6 @@ status_redraw(struct client *c)
|
|||||||
}
|
}
|
||||||
screen_write_start(&ctx, NULL, &sl->screen);
|
screen_write_start(&ctx, NULL, &sl->screen);
|
||||||
|
|
||||||
/* Create format tree. */
|
|
||||||
flags = FORMAT_STATUS;
|
|
||||||
if (c->flags & CLIENT_STATUSFORCE)
|
|
||||||
flags |= FORMAT_FORCE;
|
|
||||||
ft = format_create(c, NULL, FORMAT_NONE, flags);
|
|
||||||
format_defaults(ft, c, NULL, NULL, NULL);
|
|
||||||
|
|
||||||
/* Write the status lines. */
|
/* Write the status lines. */
|
||||||
o = options_get(s->options, "status-format");
|
o = options_get(s->options, "status-format");
|
||||||
if (o == NULL) {
|
if (o == NULL) {
|
||||||
|
Loading…
Reference in New Issue
Block a user