aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/window.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2016-02-15 03:55:23 -0500
committerJustin M. Keyes <justinkz@gmail.com>2016-02-15 03:55:23 -0500
commitbaee9fe286fdcb9b04914feb8ab875c6143c2883 (patch)
treee43970514bd6a60c2c9ddba4852a099e73e9bbce /src/nvim/window.c
parent1e995ea2fd37f61ddf5496bfddf49b5ee0a527a8 (diff)
parentb137ebdd17cd3015fdb1123c2c1d9c54f37e8548 (diff)
downloadrneovim-baee9fe286fdcb9b04914feb8ab875c6143c2883.tar.gz
rneovim-baee9fe286fdcb9b04914feb8ab875c6143c2883.tar.bz2
rneovim-baee9fe286fdcb9b04914feb8ab875c6143c2883.zip
Merge pull request #4220 from watiko/vim-7.4.792
vim-patch:7.4.792
Diffstat (limited to 'src/nvim/window.c')
-rw-r--r--src/nvim/window.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/nvim/window.c b/src/nvim/window.c
index e84d8df36b..36cb48f3a1 100644
--- a/src/nvim/window.c
+++ b/src/nvim/window.c
@@ -5342,14 +5342,14 @@ void restore_buffer(buf_T *save_curbuf)
}
-/*
- * Add match to the match list of window 'wp'. The pattern 'pat' will be
- * highlighted with the group 'grp' with priority 'prio'.
- * Optionally, a desired ID 'id' can be specified (greater than or equal to 1).
- * If no particular ID is desired, -1 must be specified for 'id'.
- * Return ID of added match, -1 on failure.
- */
-int match_add(win_T *wp, char_u *grp, char_u *pat, int prio, int id, list_T *pos_list)
+// Add match to the match list of window 'wp'. The pattern 'pat' will be
+// highlighted with the group 'grp' with priority 'prio'.
+// Optionally, a desired ID 'id' can be specified (greater than or equal to 1).
+// If no particular ID is desired, -1 must be specified for 'id'.
+// Return ID of added match, -1 on failure.
+int match_add(win_T *wp, char_u *grp, char_u *pat,
+ int prio, int id, list_T *pos_list,
+ char_u *conceal_char)
{
matchitem_T *cur;
matchitem_T *prev;
@@ -5405,6 +5405,10 @@ int match_add(win_T *wp, char_u *grp, char_u *pat, int prio, int id, list_T *pos
m->match.regprog = regprog;
m->match.rmm_ic = FALSE;
m->match.rmm_maxcol = 0;
+ m->conceal_char = 0;
+ if (conceal_char != NULL) {
+ m->conceal_char = (*mb_ptr2char)(conceal_char);
+ }
// Set up position matches
if (pos_list != NULL)