[highlight] for format highlights, only set semantic color if nothing else is specified

Fixes #1016
This commit is contained in:
Tim Stack 2022-08-01 19:30:03 -07:00
parent d22727242a
commit 40037b0fd1
1 changed files with 6 additions and 2 deletions

View File

@ -1142,8 +1142,12 @@ looper()
for (const auto& format : log_format::get_root_formats()) {
for (auto& hl : format->lf_highlighters) {
hl.with_attrs(hl.h_attrs
| vc.attrs_for_ident(hl.h_pattern));
if (hl.h_fg.empty() && hl.h_bg.empty()
&& hl.h_attrs.empty())
{
hl.with_attrs(hl.h_attrs
| vc.attrs_for_ident(hl.h_pattern));
}
lnav_data.ld_views[LNV_LOG].get_highlights()[{
highlight_source_t::CONFIGURATION,