mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-25 01:40:19 -05:00
config: use a packed bitfield for “use custom color” flags
This commit is contained in:
parent
0d17fd6a5d
commit
fcbb5a0bf7
3 changed files with 9 additions and 4 deletions
6
config.c
6
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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue