summaryrefslogtreecommitdiffstats
path: root/src/drawline.c
diff options
context:
space:
mode:
authorLemonBoy <thatlemon@gmail.com>2022-05-08 21:25:20 +0100
committerBram Moolenaar <Bram@vim.org>2022-05-08 21:25:20 +0100
commit9830db63057db76044eca89cc4cfb2758ae7a543 (patch)
tree7e1374f9424948a1cef4626571196cd77fa6628e /src/drawline.c
parentcb747899bd99361a299a163f3aa55d5fe7d6f798 (diff)
patch 8.2.4918: conceal character from matchadd() displayed too many timesv8.2.4918
Problem: Conceal character from matchadd() displayed too many times. Solution: Check the syntax flag. (closes #10381, closes #7268)
Diffstat (limited to 'src/drawline.c')
-rw-r--r--src/drawline.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/drawline.c b/src/drawline.c
index caff9abc70..a8739fe3d1 100644
--- a/src/drawline.c
+++ b/src/drawline.c
@@ -2477,14 +2477,16 @@ win_line(
#ifdef FEAT_CONCEAL
if ( wp->w_p_cole > 0
- && (wp != curwin || lnum != wp->w_cursor.lnum ||
- conceal_cursor_line(wp))
+ && (wp != curwin || lnum != wp->w_cursor.lnum
+ || 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))
{
char_attr = conceal_attr;
- if ((prev_syntax_id != syntax_seqnr || has_match_conc > 1)
+ if (((prev_syntax_id != syntax_seqnr
+ && (syntax_flags & HL_CONCEAL) != 0)
+ || has_match_conc > 1)
&& (syn_get_sub_char() != NUL
|| (has_match_conc && match_conc)
|| wp->w_p_cole == 1)