From fcbb5a0bf7c6f77eb067fa223b37a792c575df56 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Sat, 6 Feb 2021 10:35:48 +0100 Subject: config: use a packed bitfield for “use custom color” flags MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'config.c') diff --git a/config.c b/config.c index 74cff1f3..285bc889 100644 --- a/config.c +++ b/config.c @@ -2281,7 +2281,9 @@ config_load(struct config *conf, const char *conf_path, .alpha = 0xffff, .selection_fg = 0x80000000, /* Use default bg */ .selection_bg = 0x80000000, /* Use default fg */ - .selection_uses_custom_colors = false, + .use_custom = { + .selection = false, + }, }, .cursor = { @@ -2378,7 +2380,7 @@ config_load(struct config *conf, const char *conf_path, ret = parse_config_file(f, conf, conf_file.path, errors_are_fatal); fclose(f); - conf->colors.selection_uses_custom_colors = + conf->colors.use_custom.selection = conf->colors.selection_fg >> 24 == 0 && conf->colors.selection_bg >> 24 == 0; -- cgit v1.3