diff 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
line wrap: on
line diff
--- a/src/drawline.c
+++ b/src/drawline.c
@@ -751,8 +751,6 @@ win_line(
 	win_attr = wcr_attr;
 	area_highlighting = TRUE;
     }
-    if (vi_attr != 0 && win_attr != 0)
-	vi_attr = hl_combine_attr(win_attr, vi_attr);
 
 #ifdef FEAT_TEXT_PROP
     if (WIN_IS_POPUP(wp))
@@ -1444,10 +1442,6 @@ win_line(
 			prev_syntax_attr = syntax_attr;
 		    }
 
-		    // combine syntax attribute with 'wincolor'
-		    if (syntax_attr != 0 && win_attr != 0)
-			syntax_attr = hl_combine_attr(win_attr, syntax_attr);
-
 		    if (did_emsg)
 		    {
 			wp->w_s->b_syn_error = TRUE;
@@ -1548,8 +1542,15 @@ win_line(
 #endif
 	    }
 	}
-	if (char_attr == 0)
-	    char_attr = win_attr;
+
+	// combine attribute with 'wincolor'
+	if (win_attr != 0)
+	{
+	    if (char_attr == 0)
+		char_attr = win_attr;
+	    else
+		char_attr = hl_combine_attr(win_attr, char_attr);
+	}
 
 	// Get the next character to put on the screen.
 
@@ -3140,4 +3141,3 @@ win_line(
     vim_free(p_extra_free);
     return row;
 }
-