Mercurial > vim
diff src/window.c @ 6947:1efa7c2b9368 v7.4.792
patch 7.4.792
Problem: Can only conceal text by defining syntax items.
Solution: Use matchadd() to define concealing. (Christian Brabandt)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Tue, 21 Jul 2015 15:48:27 +0200 |
parents | c0bc9b60fb8a |
children | 286fd54c7ae3 |
line wrap: on
line diff
--- a/src/window.c +++ b/src/window.c @@ -6943,13 +6943,14 @@ win_hasvertsplit() * Return ID of added match, -1 on failure. */ int -match_add(wp, grp, pat, prio, id, pos_list) +match_add(wp, grp, pat, prio, id, pos_list, conceal_char) win_T *wp; char_u *grp; char_u *pat; int prio; int id; list_T *pos_list; + char_u *conceal_char UNUSED; /* pointer to conceal replacement char */ { matchitem_T *cur; matchitem_T *prev; @@ -7009,6 +7010,11 @@ match_add(wp, grp, pat, prio, id, pos_li m->match.regprog = regprog; m->match.rmm_ic = FALSE; m->match.rmm_maxcol = 0; +#ifdef FEAT_CONCEAL + m->conceal_char = 0; + if (conceal_char != NULL) + m->conceal_char = (*mb_ptr2char)(conceal_char); +#endif /* Set up position matches */ if (pos_list != NULL)