vim-patch:8.0.0914: highlight attributes are always combined (#10256)

Problem:    Highlight attributes are always combined.
Solution:   Add the 'nocombine' value to replace attributes instead of
            combining them. (scauligi, closes vim/vim#1963)
0cd2a94a40

Closes https://github.com/neovim/neovim/pull/10256.
This commit is contained in:
Daniel Hahler
2019-06-17 22:35:07 +02:00
parent 2621f4455d
commit cb25207171
5 changed files with 64 additions and 6 deletions

View File

@@ -308,8 +308,16 @@ int hl_combine_attr(int char_attr, int prim_attr)
// start with low-priority attribute, and override colors if present below.
HlAttrs new_en = char_aep;
new_en.cterm_ae_attr |= spell_aep.cterm_ae_attr;
new_en.rgb_ae_attr |= spell_aep.rgb_ae_attr;
if (spell_aep.cterm_ae_attr & HL_NOCOMBINE) {
new_en.cterm_ae_attr = spell_aep.cterm_ae_attr;
} else {
new_en.cterm_ae_attr |= spell_aep.cterm_ae_attr;
}
if (spell_aep.rgb_ae_attr & HL_NOCOMBINE) {
new_en.rgb_ae_attr = spell_aep.rgb_ae_attr;
} else {
new_en.rgb_ae_attr |= spell_aep.rgb_ae_attr;
}
if (spell_aep.cterm_fg_color > 0) {
new_en.cterm_fg_color = spell_aep.cterm_fg_color;