aboutsummaryrefslogtreecommitdiff
path: root/style.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2015-04-19 14:44:56 +0100
committerThomas Adam <thomas@xteddy.org>2015-04-19 14:44:56 +0100
commit370cf75458e7736920559870d8ccff1d4bcee755 (patch)
tree417b6bf25806d5e5d1d5d87a39f2431b30a04ca2 /style.c
parent5e956f114819294e03166e6c66128feb6e0571a2 (diff)
parent4a7587931ce54aa1a94a104480113d658c295b6b (diff)
downloadrtmux-370cf75458e7736920559870d8ccff1d4bcee755.tar.gz
rtmux-370cf75458e7736920559870d8ccff1d4bcee755.tar.bz2
rtmux-370cf75458e7736920559870d8ccff1d4bcee755.zip
Merge branch 'obsd-master'
Diffstat (limited to 'style.c')
-rw-r--r--style.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/style.c b/style.c
index d8ab07a3..5534f118 100644
--- a/style.c
+++ b/style.c
@@ -160,13 +160,21 @@ style_update_new(struct options *oo, const char *name, const char *newname)
{
int value;
struct grid_cell *gc;
+ struct options_entry *o;
/* It's a colour or attribute, but with no -style equivalent. */
if (newname == NULL)
return;
- gc = options_get_style(oo, newname);
- value = options_get_number(oo, name);
+ o = options_find1(oo, newname);
+ 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)
colour_set_bg(gc, value);