mirror of
https://github.com/tmux/tmux.git
synced 2024-12-24 10:08:48 +00:00
Fix setting old-style window -fg/-bg/-attr options that aren't global.
This commit is contained in:
parent
0cd55eb1e7
commit
f922920609
12
style.c
12
style.c
@ -160,13 +160,21 @@ style_update_new(struct options *oo, const char *name, const char *newname)
|
|||||||
{
|
{
|
||||||
int value;
|
int value;
|
||||||
struct grid_cell *gc;
|
struct grid_cell *gc;
|
||||||
|
struct options_entry *o;
|
||||||
|
|
||||||
/* It's a colour or attribute, but with no -style equivalent. */
|
/* It's a colour or attribute, but with no -style equivalent. */
|
||||||
if (newname == NULL)
|
if (newname == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
gc = options_get_style(oo, newname);
|
o = options_find1(oo, newname);
|
||||||
value = options_get_number(oo, name);
|
if (o == NULL)
|
||||||
|
o = options_set_style (oo, newname, "default", 0);
|
||||||
|
gc = &o->style;
|
||||||
|
|
||||||
|
o = options_find1(oo, name);
|
||||||
|
if (o == NULL)
|
||||||
|
o = options_set_number (oo, name, 8);
|
||||||
|
value = o->num;
|
||||||
|
|
||||||
if (strstr(name, "-bg") != NULL)
|
if (strstr(name, "-bg") != NULL)
|
||||||
colour_set_bg(gc, value);
|
colour_set_bg(gc, value);
|
||||||
|
Loading…
Reference in New Issue
Block a user