mirror of
https://github.com/neovim/neovim.git
synced 2025-10-04 08:56:29 +00:00
fix(hl): return cterm fg/bg even if they match Normal #18981
Fixes #18980 -831fa45ad8
is related but this doesn't regress that - The `cterm_normal_fg_color != ae.cterm_fg_color` comparison is originally carried from patch to patch starting all the way back in29bc6dfabd
where it was avoiding setting a HL attr. But `hlattrs2dict()` now is just informational.
This commit is contained in:
@@ -792,11 +792,11 @@ Dictionary hlattrs2dict(HlAttrs ae, bool use_rgb)
|
||||
PUT(hl, "special", INTEGER_OBJ(ae.rgb_sp_color));
|
||||
}
|
||||
} else {
|
||||
if (cterm_normal_fg_color != ae.cterm_fg_color && ae.cterm_fg_color != 0) {
|
||||
if (ae.cterm_fg_color != 0) {
|
||||
PUT(hl, "foreground", INTEGER_OBJ(ae.cterm_fg_color - 1));
|
||||
}
|
||||
|
||||
if (cterm_normal_bg_color != ae.cterm_bg_color && ae.cterm_bg_color != 0) {
|
||||
if (ae.cterm_bg_color != 0) {
|
||||
PUT(hl, "background", INTEGER_OBJ(ae.cterm_bg_color - 1));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user