1
0
forked from aniani/vim

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)
This commit is contained in:
Bram Moolenaar
2019-03-30 16:39:05 +01:00
parent 433a5eb9de
commit ab62c19ea0
2 changed files with 10 additions and 4 deletions

View File

@@ -4133,8 +4133,12 @@ win_line(
shl->endcol = tmp_col; shl->endcol = tmp_col;
shl->attr_cur = shl->attr; shl->attr_cur = shl->attr;
#ifdef FEAT_CONCEAL #ifdef FEAT_CONCEAL
if (cur != NULL && syn_name2id((char_u *)"Conceal") // Match with the "Conceal" group results in hiding
== cur->hlg_id) // the match.
if (cur != NULL
&& shl != &search_hl
&& syn_name2id((char_u *)"Conceal")
== cur->hlg_id)
{ {
has_match_conc = has_match_conc =
v == (long)shl->startcol ? 2 : 1; v == (long)shl->startcol ? 2 : 1;
@@ -5175,8 +5179,8 @@ win_line(
#ifdef FEAT_CONCEAL #ifdef FEAT_CONCEAL
if ( wp->w_p_cole > 0 if ( wp->w_p_cole > 0
&& (wp != curwin || lnum != wp->w_cursor.lnum || && (wp != curwin || lnum != wp->w_cursor.lnum ||
conceal_cursor_line(wp) ) conceal_cursor_line(wp))
&& ( (syntax_flags & HL_CONCEAL) != 0 || has_match_conc > 0) && ((syntax_flags & HL_CONCEAL) != 0 || has_match_conc > 0)
&& !(lnum_in_visual_area && !(lnum_in_visual_area
&& vim_strchr(wp->w_p_cocu, 'v') == NULL)) && vim_strchr(wp->w_p_cocu, 'v') == NULL))
{ {

View File

@@ -775,6 +775,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
1082,
/**/ /**/
1081, 1081,
/**/ /**/