1
0
forked from aniani/vim

patch 7.4.792

Problem:    Can only conceal text by defining syntax items.
Solution:   Use matchadd() to define concealing. (Christian Brabandt)
This commit is contained in:
Bram Moolenaar
2015-07-21 15:48:27 +02:00
parent d51cb706a4
commit 6561d52ecb
16 changed files with 328 additions and 21 deletions

View File

@@ -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_list)
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)