diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-09-02 13:26:29 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-09-02 13:26:29 +0100 |
commit | cf2bb633978a3d2d5bba06611c95e15170662c15 (patch) | |
tree | d08fe428c78f2e0e92dcfe40ba8c1582cd53486b /src/drawline.c | |
parent | a02a8a4d849906ae100f46f23642b5f7d1bd314e (diff) |
patch 9.0.0357: 'linebreak' interferes with text property highlightv9.0.0357
Problem: 'linebreak' interferes with text property highlight if there is
syntax highlighting.
Solution: Check the text prop attributes after combining with syntax
attributes. (closes #11035)
Diffstat (limited to 'src/drawline.c')
-rw-r--r-- | src/drawline.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/drawline.c b/src/drawline.c index 26886bd945..6c298b6f48 100644 --- a/src/drawline.c +++ b/src/drawline.c @@ -612,6 +612,8 @@ win_line( proptype_T *text_prop_type = NULL; int extra_for_textprop = FALSE; // wlv.n_extra set for textprop int text_prop_attr = 0; + int text_prop_attr_comb = 0; // text_prop_attr combined with + // syntax_attr int text_prop_id = 0; // active property ID int text_prop_flags = 0; int text_prop_follows = FALSE; // another text prop to display @@ -1676,7 +1678,7 @@ win_line( --pi; # ifdef FEAT_LINEBREAK // not exactly right but should work in most cases - if (in_linebreak && syntax_attr == text_prop_attr) + if (in_linebreak && syntax_attr == text_prop_attr_comb) syntax_attr = 0; # endif } @@ -1716,6 +1718,7 @@ win_line( if (wlv.n_extra == 0 || !extra_for_textprop) { text_prop_attr = 0; + text_prop_attr_comb = 0; text_prop_flags = 0; text_prop_type = NULL; text_prop_id = 0; @@ -1789,6 +1792,7 @@ win_line( saved_search_attr = search_attr; search_attr = 0; // restore when n_extra is zero text_prop_attr = 0; + text_prop_attr_comb = 0; if (*ptr == NUL) // don't combine char attr after EOL text_prop_flags &= ~PT_FLAG_COMBINE; @@ -1974,6 +1978,7 @@ win_line( syntax_attr = hl_combine_attr(syntax_attr, text_prop_attr); else syntax_attr = text_prop_attr; + text_prop_attr_comb = syntax_attr; } # endif #endif |