From 63c46c11062f5c720644d9bb419f42b0a6d837c8 Mon Sep 17 00:00:00 2001 From: Michael Ennen Date: Tue, 6 Dec 2016 22:56:14 -0700 Subject: vim-patch:8.0.0040 Problem: Whole line highlighting with matchaddpos() does not work. Solution: Check for zero length. (Hirohito Higashi) https://github.com/vim/vim/commit/8507747600bddfd6a68aed057840856bf5548e61 --- src/nvim/testdir/test_match.vim | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_match.vim b/src/nvim/testdir/test_match.vim index d176bf9a87..7748dee87f 100644 --- a/src/nvim/testdir/test_match.vim +++ b/src/nvim/testdir/test_match.vim @@ -191,7 +191,15 @@ func Test_matchaddpos() call assert_equal(screenattr(2,2), screenattr(1,7)) call assert_notequal(screenattr(2,2), screenattr(1,8)) + call clearmatches() + call matchaddpos('Error', [[1], [2,2]]) + redraw! + call assert_equal(screenattr(2,2), screenattr(1,1)) + call assert_equal(screenattr(2,2), screenattr(1,10)) + call assert_notequal(screenattr(2,2), screenattr(1,11)) + nohl + call clearmatches() syntax off set hlsearch& endfunc -- cgit