mirror of
https://github.com/tstack/lnav
synced 2024-11-05 21:21:19 +00:00
[theme] default to using default colors and, if default coloring is not enabled, turn -1 into white/black for fg/bg
This commit is contained in:
parent
2ed88815da
commit
9db2dfa7a4
@ -107,7 +107,7 @@ struct key_map {
|
||||
struct _lnav_config {
|
||||
std::string lc_ui_clock_format;
|
||||
bool lc_ui_dim_text;
|
||||
bool lc_ui_default_colors;
|
||||
bool lc_ui_default_colors{true};
|
||||
std::string lc_ui_keymap;
|
||||
std::string lc_ui_theme;
|
||||
std::unordered_map<std::string, key_map> lc_ui_keymaps;
|
||||
|
@ -619,6 +619,13 @@ inline attr_t attr_for_colors(int &pair_base, short fg, short bg)
|
||||
if (bg == COLOR_BLACK) {
|
||||
bg = -1;
|
||||
}
|
||||
} else {
|
||||
if (fg == -1) {
|
||||
fg = COLOR_WHITE;
|
||||
}
|
||||
if (bg == -1) {
|
||||
bg = COLOR_BLACK;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user