patch 8.0.0040
Problem: Whole line highlighting with matchaddpos() does not work.
Solution: Check for zero length. (Hirohito Higashi)
diff --git a/src/testdir/test_match.vim b/src/testdir/test_match.vim
index 3b20d5d..9398ef2 100644
--- a/src/testdir/test_match.vim
+++ b/src/testdir/test_match.vim
@@ -191,7 +191,15 @@
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