Mercurial > vim
diff src/testdir/test_match.vim @ 10273:489eae19cad9 v8.0.0033
commit https://github.com/vim/vim/commit/a6c27ee6db2c328e0ab0e6d143e2a295a0bb9c9a
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Oct 15 14:56:30 2016 +0200
patch 8.0.0033
Problem: Cannot use overlapping positions with matchaddpos().
Solution: Check end of match. (Ozaki Kiichi) Add a test (Hirohito Higashi)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 15 Oct 2016 15:00:04 +0200 |
parents | 3e3b0ce24b61 |
children | 1c1fcf515607 |
line wrap: on
line diff
--- a/src/testdir/test_match.vim +++ b/src/testdir/test_match.vim @@ -181,6 +181,16 @@ func Test_matchaddpos() redraw! call assert_equal(screenattr(2,2), screenattr(1,6)) + " Check overlapping pos + call clearmatches() + call setline(1, ['1234567890', 'NH']) + call matchaddpos('Error', [[1,1,5], [1,3,5], [2,2]]) + redraw! + call assert_notequal(screenattr(2,2), 0) + call assert_equal(screenattr(2,2), screenattr(1,5)) + call assert_equal(screenattr(2,2), screenattr(1,7)) + call assert_notequal(screenattr(2,2), screenattr(1,8)) + nohl syntax off set hlsearch&