# endif
}
}
+# ifdef FEAT_TEXT_PROP
+ // Combine text property highlight into syntax highlight.
+ if (text_prop_type != NULL)
+ {
+ if (text_prop_combine)
+ syntax_attr = hl_combine_attr(syntax_attr, text_prop_attr);
+ else
+ syntax_attr = text_prop_attr;
+ }
+# endif
#endif
// Decide which of the highlight attributes to use.
{
char_attr = hl_combine_attr(line_attr, area_attr);
# ifdef FEAT_SYN_HL
- if (syntax_attr != 0)
- char_attr = hl_combine_attr(syntax_attr, char_attr);
+ char_attr = hl_combine_attr(syntax_attr, char_attr);
# endif
}
else if (search_attr != 0)
{
char_attr = hl_combine_attr(line_attr, search_attr);
# ifdef FEAT_SYN_HL
- if (syntax_attr != 0)
- char_attr = hl_combine_attr(syntax_attr, char_attr);
+ char_attr = hl_combine_attr(syntax_attr, char_attr);
# endif
}
-# ifdef FEAT_TEXT_PROP
- else if (text_prop_type != NULL)
- {
- char_attr = hl_combine_attr(line_attr != 0
- ? line_attr
- : syntax_attr != 0
- ? syntax_attr
- : win_attr, text_prop_attr);
- }
-# endif
else if (line_attr != 0 && ((fromcol == -10 && tocol == MAXCOL)
|| vcol < fromcol || vcol_prev < fromcol_prev
|| vcol >= tocol))
// Use line_attr when not in the Visual or 'incsearch' area
// (area_attr may be 0 when "noinvcur" is set).
# ifdef FEAT_SYN_HL
- if (syntax_attr != 0)
- char_attr = hl_combine_attr(syntax_attr, line_attr);
- else
+ char_attr = hl_combine_attr(syntax_attr, line_attr);
+# else
+ char_attr = line_attr;
# endif
- char_attr = line_attr;
attr_pri = FALSE;
}
#else
else
{
attr_pri = FALSE;
-#ifdef FEAT_TEXT_PROP
- if (text_prop_type != NULL)
- {
- if (text_prop_combine)
- char_attr = hl_combine_attr(
- syntax_attr, text_prop_attr);
- else
- char_attr = hl_combine_attr(
- win_attr, text_prop_attr);
- }
- else
-#endif
#ifdef FEAT_SYN_HL
- char_attr = syntax_attr;
+ char_attr = syntax_attr;
#else
- char_attr = 0;
+ char_attr = 0;
#endif
}
}
\ "call prop_type_add('start', {'highlight': 'NumberProp', 'start_incl': 1})",
\ "call prop_type_add('end', {'highlight': 'NumberProp', 'end_incl': 1})",
\ "call prop_type_add('both', {'highlight': 'NumberProp', 'start_incl': 1, 'end_incl': 1})",
- \ "call prop_type_add('background', {'highlight': 'NumberProp', 'combine': 1})",
- \ "eval 'background'->prop_type_change({'highlight': 'BackgroundProp'})",
+ \ "call prop_type_add('background', {'highlight': 'BackgroundProp', 'combine': 0})",
+ \ "call prop_type_add('backgroundcomb', {'highlight': 'NumberProp', 'combine': 1})",
+ \ "eval 'backgroundcomb'->prop_type_change({'highlight': 'BackgroundProp'})",
\ "call prop_type_add('error', {'highlight': 'UnderlineProp', 'combine': 1})",
\ "call prop_add(1, 4, {'end_lnum': 3, 'end_col': 3, 'type': 'long'})",
\ "call prop_add(2, 9, {'length': 3, 'type': 'number'})",
\ "call prop_add(3, 7, {'length': 2, 'type': 'start'})",
\ "call prop_add(3, 11, {'length': 2, 'type': 'end'})",
\ "call prop_add(3, 15, {'length': 2, 'type': 'both'})",
- \ "call prop_add(4, 12, {'length': 10, 'type': 'background'})",
+ \ "call prop_add(4, 6, {'length': 3, 'type': 'background'})",
+ \ "call prop_add(4, 12, {'length': 10, 'type': 'backgroundcomb'})",
\ "call prop_add(4, 17, {'length': 5, 'type': 'error'})",
\ "call prop_add(5, 7, {'length': 4, 'type': 'long'})",
\ "call prop_add(6, 1, {'length': 8, 'type': 'long'})",