summaryrefslogtreecommitdiffstats
path: root/src/drawline.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-06-25 20:07:04 +0200
committerBram Moolenaar <Bram@vim.org>2020-06-25 20:07:04 +0200
commit211dd3fd82216ca879fe7f917ea345b3ae366ce1 (patch)
tree21bd8158c75ac29a1a58cb6ec024ed8ace365464 /src/drawline.c
parent73b4465ba7f170c5a1701ad908144970e758b1f5 (diff)
patch 8.2.1056: wrong display when mixing match conceal and syntax concealv8.2.1056
Problem: Wrong display when mixing match conceal and syntax conceal. Solution: Adjust how conceal flags are used. (closes #6327, closes #6303)
Diffstat (limited to 'src/drawline.c')
-rw-r--r--src/drawline.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/drawline.c b/src/drawline.c
index 6d14bda7b6..fad0645fe8 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();