changeset 16154:f344647acbbc v8.1.1082

patch 8.1.1082: "Conceal" match is mixed up with 'hlsearch' match. commit https://github.com/vim/vim/commit/ab62c19ea034d76632bbbf4265a9fc17e7508541 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Mar 30 16:39:05 2019 +0100 patch 8.1.1082: "Conceal" match is mixed up with 'hlsearch' match. Problem: "Conceal" match is mixed up with 'hlsearch' match. Solution: Check that a match is found, not a 'hlsearch' item. (Andy Massimino, closes #4073)
author Bram Moolenaar <Bram@vim.org>
date Sat, 30 Mar 2019 16:45:04 +0100
parents ec822e24dec4
children 008036af96aa
files src/screen.c src/version.c
diffstat 2 files changed, 10 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/screen.c
+++ b/src/screen.c
@@ -4133,8 +4133,12 @@ win_line(
 				shl->endcol = tmp_col;
 			    shl->attr_cur = shl->attr;
 #ifdef FEAT_CONCEAL
-			    if (cur != NULL && syn_name2id((char_u *)"Conceal")
-							       == cur->hlg_id)
+			    // Match with the "Conceal" group results in hiding
+			    // the match.
+			    if (cur != NULL
+				    && shl != &search_hl
+				    && syn_name2id((char_u *)"Conceal")
+								== cur->hlg_id)
 			    {
 				has_match_conc =
 					     v == (long)shl->startcol ? 2 : 1;
@@ -5175,8 +5179,8 @@ win_line(
 #ifdef FEAT_CONCEAL
 	    if (   wp->w_p_cole > 0
 		&& (wp != curwin || lnum != wp->w_cursor.lnum ||
-							conceal_cursor_line(wp) )
-		&& ( (syntax_flags & HL_CONCEAL) != 0 || has_match_conc > 0)
+						       conceal_cursor_line(wp))
+		&& ((syntax_flags & HL_CONCEAL) != 0 || has_match_conc > 0)
 		&& !(lnum_in_visual_area
 				    && vim_strchr(wp->w_p_cocu, 'v') == NULL))
 	    {
--- a/src/version.c
+++ b/src/version.c
@@ -776,6 +776,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1082,
+/**/
     1081,
 /**/
     1080,