diff options
author | nicm <nicm> | 2014-01-28 23:07:09 +0000 |
---|---|---|
committer | nicm <nicm> | 2014-01-28 23:07:09 +0000 |
commit | 945339b443affdaaca260605e15b5a3b9a3c6e16 (patch) | |
tree | d04a4ccbdb9d83ded880cda1277911f6cf436197 /window-choose.c | |
parent | c930fd5ff696f5a60e93ed503f0ff57e0bbf6e4d (diff) |
Allow replacing each of the many sets of separate foo-{fg,bg,attr}
options with a single foo-style option. For example:
set -g status-fg yellow
set -g status-bg red
set -g status-attr blink
Becomes:
set -g status-style fg=yellow,bg=red,blink
The -a flag to set can be used to add to rather than replace a style. So:
set -g status-bg red
Becomes:
set -ag status-style bg=red
Currently this is fully backwards compatible (all *-{fg,bg,attr} options
remain) but the plan is to deprecate them over time.
From Tiago Cunha.
Diffstat (limited to 'window-choose.c')
-rw-r--r-- | window-choose.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/window-choose.c b/window-choose.c index 77add5e4..0cf7f66b 100644 --- a/window-choose.c +++ b/window-choose.c @@ -736,7 +736,7 @@ window_choose_write_line( utf8flag = options_get_number(&wp->window->options, "utf8"); memcpy(&gc, &grid_default_cell, sizeof gc); if (data->selected == data->top + py) - window_mode_attrs(&gc, oo); + style_apply(&gc, oo, "mode-style"); screen_write_cursormove(ctx, 0, py); if (data->top + py < ARRAY_LENGTH(&data->list)) { @@ -763,7 +763,7 @@ window_choose_write_line( screen_write_putc(ctx, &gc, ' '); if (data->input_type != WINDOW_CHOOSE_NORMAL) { - window_mode_attrs(&gc, oo); + style_apply(&gc, oo, "mode-style"); xoff = xsnprintf(hdr, sizeof hdr, "%s: %s", data->input_prompt, data->input_str); |