aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2017-01-17 02:01:11 +0000
committerThomas Adam <thomas@xteddy.org>2017-01-17 02:01:11 +0000
commit64c486ae81b226bda1ae9f753235c6384934c94a (patch)
treee3941a7df619e9744739b1583958c79a23adab0a
parentc0346701dfa2a4aa4c2ea6f05157406bcfb7a50b (diff)
parent6b6b0e91d0e3ee5d92f67f383172037bf1348880 (diff)
downloadrtmux-64c486ae81b226bda1ae9f753235c6384934c94a.tar.gz
rtmux-64c486ae81b226bda1ae9f753235c6384934c94a.tar.bz2
rtmux-64c486ae81b226bda1ae9f753235c6384934c94a.zip
Merge branch 'obsd-master'
-rw-r--r--options.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/options.c b/options.c
index ffea70be..9c260e26 100644
--- a/options.c
+++ b/options.c
@@ -647,11 +647,14 @@ options_style_update_old(struct options *oo, struct options_entry *o)
size = strrchr(o->name, '-') - o->name;
xsnprintf(newname, sizeof newname, "%.*s-bg", size, o->name);
- options_set_number(oo, newname, o->style.bg);
+ if (options_get(oo, newname) != NULL)
+ options_set_number(oo, newname, o->style.bg);
xsnprintf(newname, sizeof newname, "%.*s-fg", size, o->name);
- options_set_number(oo, newname, o->style.fg);
+ if (options_get(oo, newname) != NULL)
+ options_set_number(oo, newname, o->style.fg);
xsnprintf(newname, sizeof newname, "%.*s-attr", size, o->name);
- options_set_number(oo, newname, o->style.attr);
+ if (options_get(oo, newname) != NULL)
+ options_set_number(oo, newname, o->style.attr);
}