diff options
| author | Bram Moolenaar <Bram@vim.org> | 2016-10-27 17:27:44 +0200 |
|---|---|---|
| committer | Bram Moolenaar <Bram@vim.org> | 2016-10-27 17:27:44 +0200 |
| commit | 2f97912800e86a296c001832bbbf2fc425f1e533 (patch) | |
| tree | e304476d781edf4c5f1603e3c4787b0338cc8c64 /src/testdir | |
| parent | 6d5ad4c4118cab5fd96db157621c3aa9af368edb (diff) | |
| download | vim-git-2f97912800e86a296c001832bbbf2fc425f1e533.tar.gz | |
patch 8.0.0049v8.0.0049
Problem: When a match ends in part of concealed text highlighting, it might
mess up concealing by resetting prev_syntax_id.
Solution: Do not reset prev_syntax_id and add a test to verify. (Christian
Brabandt, closes #1092)
Diffstat (limited to 'src/testdir')
| -rw-r--r-- | src/testdir/test_matchadd_conceal.vim | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/testdir/test_matchadd_conceal.vim b/src/testdir/test_matchadd_conceal.vim index 5da28160c..610917fd1 100644 --- a/src/testdir/test_matchadd_conceal.vim +++ b/src/testdir/test_matchadd_conceal.vim @@ -264,3 +264,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 |
