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:
@@ -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)
|
||||
|
Reference in New Issue
Block a user