aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nvim/screen.c1
-rw-r--r--src/nvim/testdir/test_matchadd_conceal.vim22
2 files changed, 22 insertions, 1 deletions
diff --git a/src/nvim/screen.c b/src/nvim/screen.c
index b98e59ed06..280b8c65fe 100644
--- a/src/nvim/screen.c
+++ b/src/nvim/screen.c
@@ -2922,7 +2922,6 @@ win_line (
}
} else if (v == (long)shl->endcol) {
shl->attr_cur = 0;
- prev_syntax_id = 0;
next_search_hl(wp, shl, lnum, (colnr_T)v,
shl == &search_hl ? NULL : cur);
diff --git a/src/nvim/testdir/test_matchadd_conceal.vim b/src/nvim/testdir/test_matchadd_conceal.vim
index bc1c28d6e9..c788689e33 100644
--- a/src/nvim/testdir/test_matchadd_conceal.vim
+++ b/src/nvim/testdir/test_matchadd_conceal.vim
@@ -260,3 +260,25 @@ function! Test_matchadd_repeat_conceal_with_syntax_off()
quit!
endfunction
+
+function! Test_matchadd_and_syn_conceal()
+ new
+ let cnt='Inductive bool : Type := | true : bool | false : bool.'
+ let expect = 'Inductive - : Type := | true : - | false : -.'
+ 0put =cnt
+ " set filetype and :syntax on to change screenattr()
+ set cole=1 cocu=nv
+ hi link CheckedByCoq WarningMsg
+ syntax on
+ syntax keyword coqKwd bool conceal cchar=-
+ redraw!
+ call assert_equal(expect, s:screenline(1))
+ call assert_notequal(screenattr(1, 10) , screenattr(1, 11))
+ call assert_notequal(screenattr(1, 11) , screenattr(1, 12))
+ call assert_equal(screenattr(1, 11) , screenattr(1, 32))
+ call matchadd('CheckedByCoq', '\%<2l\%>9c\%<16c')
+ call assert_equal(expect, s:screenline(1))
+ call assert_notequal(screenattr(1, 10) , screenattr(1, 11))
+ call assert_notequal(screenattr(1, 11) , screenattr(1, 12))
+ call assert_equal(screenattr(1, 11) , screenattr(1, 32))
+endfunction