From 211dd3fd82216ca879fe7f917ea345b3ae366ce1 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 25 Jun 2020 20:07:04 +0200 Subject: patch 8.2.1056: wrong display when mixing match conceal and syntax conceal Problem: Wrong display when mixing match conceal and syntax conceal. Solution: Adjust how conceal flags are used. (closes #6327, closes #6303) --- src/drawline.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/drawline.c') diff --git a/src/drawline.c b/src/drawline.c index 6d14bda7b..fad0645fe 100644 --- a/src/drawline.c +++ b/src/drawline.c @@ -967,7 +967,7 @@ win_line( for (;;) { #if defined(FEAT_CONCEAL) || defined(FEAT_SEARCH_EXTRA) - int has_match_conc = 0; // match wants to conceal + int has_match_conc = 0; // match wants to conceal #endif #ifdef FEAT_CONCEAL int did_decrement_ptr = FALSE; @@ -2353,13 +2353,14 @@ win_line( { char_attr = conceal_attr; if ((prev_syntax_id != syntax_seqnr || has_match_conc > 1) - && (syn_get_sub_char() != NUL || match_conc - || wp->w_p_cole == 1) + && (syn_get_sub_char() != NUL + || (has_match_conc && match_conc) + || wp->w_p_cole == 1) && wp->w_p_cole != 3) { // First time at this concealed item: display one // character. - if (match_conc) + if (has_match_conc && match_conc) c = match_conc; else if (syn_get_sub_char() != NUL) c = syn_get_sub_char(); -- cgit v1.2.1