diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-08-31 22:00:05 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-08-31 22:00:05 +0200 |
commit | 39f7aa3c3124065b50f182b1d2f7ac92a0918656 (patch) | |
tree | 238fc2ad919f9e66aca9519d9dd30585ae918d2a /src/drawline.c | |
parent | 7d6979608ee83b06ccfab2589da3047b143defae (diff) |
patch 8.2.1556: cursorline highlighting always overrules sign highlightingv8.2.1556
Problem: Cursorline highlighting always overrules sign highlighting.
Solution: Combine the highlighting, use the priority to decide how.
(closes #6812)
Diffstat (limited to 'src/drawline.c')
-rw-r--r-- | src/drawline.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/drawline.c b/src/drawline.c index fa2596510a..2b72de6489 100644 --- a/src/drawline.c +++ b/src/drawline.c @@ -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 |