diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2022-05-09 07:06:17 +0800 |
|---|---|---|
| committer | zeertzjq <zeertzjq@outlook.com> | 2022-05-09 18:06:55 +0800 |
| commit | a56a43614cf87ec723ab8ae97d6ab8984eedf980 (patch) | |
| tree | a627456e9d8f45e1e8bf57330fe02f60946ab10a /src/nvim/testdir | |
| parent | 5382ed80288fa7476e0c249916c8def3c19726f9 (diff) | |
| download | rneovim-a56a43614cf87ec723ab8ae97d6ab8984eedf980.tar.gz rneovim-a56a43614cf87ec723ab8ae97d6ab8984eedf980.tar.bz2 rneovim-a56a43614cf87ec723ab8ae97d6ab8984eedf980.zip | |
vim-patch:8.2.4918: conceal character from matchadd() displayed too many times
Problem: Conceal character from matchadd() displayed too many times.
Solution: Check the syntax flag. (closes vim/vim#10381, closes vim/vim#7268)
https://github.com/vim/vim/commit/9830db63057db76044eca89cc4cfb2758ae7a543
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_matchadd_conceal.vim | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_matchadd_conceal.vim b/src/nvim/testdir/test_matchadd_conceal.vim index 29a2c30b0d..5e4c3948a0 100644 --- a/src/nvim/testdir/test_matchadd_conceal.vim +++ b/src/nvim/testdir/test_matchadd_conceal.vim @@ -335,6 +335,27 @@ func Test_matchadd_and_syn_conceal() call assert_equal(screenattr(1, 11) , screenattr(1, 32)) endfunc +func Test_interaction_matchadd_syntax() + CheckRunVimInTerminal + + new + " Test for issue #7268 fix. + " When redrawing the second column, win_line() was comparing the sequence + " number of the syntax-concealed region with a bogus zero value that was + " returned for the matchadd-concealed region. Before 8.0.0672 the sequence + " number was never reset, thus masking the problem. + call setline(1, 'aaa|bbb|ccc') + call matchadd('Conceal', '^..', 10, -1, #{conceal: 'X'}) + syn match foobar '^.' + setl concealcursor=n conceallevel=1 + redraw! + + call assert_equal('Xa|bbb|ccc', Screenline(1)) + call assert_notequal(screenattr(1, 1), screenattr(1, 2)) + + bwipe! +endfunc + func Test_cursor_column_in_concealed_line_after_window_scroll() CheckRunVimInTerminal |