Skip to content

Commit ab62c19

Browse files
committed
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)
1 parent 433a5eb commit ab62c19

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

src/screen.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4133,8 +4133,12 @@ win_line(
41334133
shl->endcol = tmp_col;
41344134
shl->attr_cur = shl->attr;
41354135
#ifdef FEAT_CONCEAL
4136-
if (cur != NULL && syn_name2id((char_u *)"Conceal")
4137-
== cur->hlg_id)
4136+
// Match with the "Conceal" group results in hiding
4137+
// the match.
4138+
if (cur != NULL
4139+
&& shl != &search_hl
4140+
&& syn_name2id((char_u *)"Conceal")
4141+
== cur->hlg_id)
41384142
{
41394143
has_match_conc =
41404144
v == (long)shl->startcol ? 2 : 1;
@@ -5175,8 +5179,8 @@ win_line(
51755179
#ifdef FEAT_CONCEAL
51765180
if ( wp->w_p_cole > 0
51775181
&& (wp != curwin || lnum != wp->w_cursor.lnum ||
5178-
conceal_cursor_line(wp) )
5179-
&& ( (syntax_flags & HL_CONCEAL) != 0 || has_match_conc > 0)
5182+
conceal_cursor_line(wp))
5183+
&& ((syntax_flags & HL_CONCEAL) != 0 || has_match_conc > 0)
51805184
&& !(lnum_in_visual_area
51815185
&& vim_strchr(wp->w_p_cocu, 'v') == NULL))
51825186
{

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -775,6 +775,8 @@ static char *(features[]) =
775775

776776
static int included_patches[] =
777777
{ /* Add new patch number below this line */
778+
/**/
779+
1082,
778780
/**/
779781
1081,
780782
/**/

0 commit comments

Comments
 (0)