0
0
mirror of https://github.com/vim/vim.git synced 2025-09-29 04:34:16 -04:00

patch 8.2.1556: cursorline highlighting always overrules sign highlighting

Problem:    Cursorline highlighting always overrules sign highlighting.
Solution:   Combine the highlighting, use the priority to decide how.
            (closes #6812)
This commit is contained in:
Bram Moolenaar
2020-08-31 22:00:05 +02:00
parent 7d6979608e
commit 39f7aa3c31
8 changed files with 49 additions and 4 deletions

View File

@@ -909,7 +909,19 @@ win_line(
if (!cul_screenline)
{
cul_attr = HL_ATTR(HLF_CUL);
line_attr = cul_attr;
# ifdef FEAT_SIGNS
// Combine the 'cursorline' and sign highlighting, depending on
// the sign priority.
if (sign_present && sattr.sat_linehl > 0)
{
if (sattr.sat_priority >= 100)
line_attr = hl_combine_attr(cul_attr, line_attr);
else
line_attr = hl_combine_attr(line_attr, cul_attr);
}
else
# endif
line_attr = cul_attr;
wp->w_last_cursorline = wp->w_cursor.lnum;
}
else