Mercurial > vim
comparison src/drawline.c @ 29722:f88671dbe88b v9.0.0201
patch 9.0.0201: CursorLine highlight overrules virtual text highlight
Commit: https://github.com/vim/vim/commit/9113c2cd19c72c0973ee5dc095a0a7f03f2af344
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Aug 13 20:17:34 2022 +0100
patch 9.0.0201: CursorLine highlight overrules virtual text highlight
Problem: CursorLine highlight overrules virtual text highlight.
Solution: Let extra attribute overrule line attribute. (closes https://github.com/vim/vim/issues/10909)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 13 Aug 2022 21:30:03 +0200 |
parents | a680dc1b089d |
children | 65348cc3b656 |
comparison
equal
deleted
inserted
replaced
29721:89f1f6aa39b8 | 29722:f88671dbe88b |
---|---|
1636 || wlv.row == startrow | 1636 || wlv.row == startrow |
1637 || (text_props[text_prop_next].tp_flags | 1637 || (text_props[text_prop_next].tp_flags |
1638 & TP_FLAG_ALIGN_BELOW))) | 1638 & TP_FLAG_ALIGN_BELOW))) |
1639 : bcol >= text_props[text_prop_next].tp_col - 1)) | 1639 : bcol >= text_props[text_prop_next].tp_col - 1)) |
1640 { | 1640 { |
1641 if (bcol <= text_props[text_prop_next].tp_col - 1 | 1641 if (text_props[text_prop_next].tp_col == MAXCOL |
1642 || bcol <= text_props[text_prop_next].tp_col - 1 | |
1642 + text_props[text_prop_next].tp_len) | 1643 + text_props[text_prop_next].tp_len) |
1643 text_prop_idxs[text_props_active++] = text_prop_next; | 1644 text_prop_idxs[text_props_active++] = text_prop_next; |
1644 ++text_prop_next; | 1645 ++text_prop_next; |
1645 } | 1646 } |
1646 | 1647 |
2987 && wlv.draw_state == WL_LINE | 2988 && wlv.draw_state == WL_LINE |
2988 && !attr_pri) | 2989 && !attr_pri) |
2989 { | 2990 { |
2990 #ifdef LINE_ATTR | 2991 #ifdef LINE_ATTR |
2991 if (line_attr) | 2992 if (line_attr) |
2992 wlv.char_attr = hl_combine_attr(extra_attr, line_attr); | 2993 wlv.char_attr = hl_combine_attr(line_attr, extra_attr); |
2993 else | 2994 else |
2994 #endif | 2995 #endif |
2995 wlv.char_attr = extra_attr; | 2996 wlv.char_attr = extra_attr; |
2996 } | 2997 } |
2997 | 2998 |