comparison src/drawline.c @ 18494:04a40c1514c4 v8.1.2241

patch 8.1.2241: match highlight does not combine with 'wincolor' Commit: https://github.com/vim/vim/commit/024dbd229fa7991b7bf7ef4d0888b43ab03783f7 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Nov 2 22:00:15 2019 +0100 patch 8.1.2241: match highlight does not combine with 'wincolor' Problem: Match highlight does not combine with 'wincolor'. Solution: Apply 'wincolor' last on top of any other attribute. (closes https://github.com/vim/vim/issues/5159)
author Bram Moolenaar <Bram@vim.org>
date Sat, 02 Nov 2019 22:15:05 +0100
parents b9cf60801963
children 3ebb15e3c28d
comparison
equal deleted inserted replaced
18493:9b39a91bb0c6 18494:04a40c1514c4
749 if (wcr_attr != 0) 749 if (wcr_attr != 0)
750 { 750 {
751 win_attr = wcr_attr; 751 win_attr = wcr_attr;
752 area_highlighting = TRUE; 752 area_highlighting = TRUE;
753 } 753 }
754 if (vi_attr != 0 && win_attr != 0)
755 vi_attr = hl_combine_attr(win_attr, vi_attr);
756 754
757 #ifdef FEAT_TEXT_PROP 755 #ifdef FEAT_TEXT_PROP
758 if (WIN_IS_POPUP(wp)) 756 if (WIN_IS_POPUP(wp))
759 screen_line_flags |= SLF_POPUP; 757 screen_line_flags |= SLF_POPUP;
760 #endif 758 #endif
1442 NULL, FALSE); 1440 NULL, FALSE);
1443 prev_syntax_col = v; 1441 prev_syntax_col = v;
1444 prev_syntax_attr = syntax_attr; 1442 prev_syntax_attr = syntax_attr;
1445 } 1443 }
1446 1444
1447 // combine syntax attribute with 'wincolor'
1448 if (syntax_attr != 0 && win_attr != 0)
1449 syntax_attr = hl_combine_attr(win_attr, syntax_attr);
1450
1451 if (did_emsg) 1445 if (did_emsg)
1452 { 1446 {
1453 wp->w_s->b_syn_error = TRUE; 1447 wp->w_s->b_syn_error = TRUE;
1454 has_syntax = FALSE; 1448 has_syntax = FALSE;
1455 syntax_attr = 0; 1449 syntax_attr = 0;
1546 #else 1540 #else
1547 char_attr = 0; 1541 char_attr = 0;
1548 #endif 1542 #endif
1549 } 1543 }
1550 } 1544 }
1551 if (char_attr == 0) 1545
1552 char_attr = win_attr; 1546 // combine attribute with 'wincolor'
1547 if (win_attr != 0)
1548 {
1549 if (char_attr == 0)
1550 char_attr = win_attr;
1551 else
1552 char_attr = hl_combine_attr(win_attr, char_attr);
1553 }
1553 1554
1554 // Get the next character to put on the screen. 1555 // Get the next character to put on the screen.
1555 1556
1556 // The "p_extra" points to the extra stuff that is inserted to 1557 // The "p_extra" points to the extra stuff that is inserted to
1557 // represent special characters (non-printable stuff) and other 1558 // represent special characters (non-printable stuff) and other
3138 #endif 3139 #endif
3139 3140
3140 vim_free(p_extra_free); 3141 vim_free(p_extra_free);
3141 return row; 3142 return row;
3142 } 3143 }
3143