diff src/testdir/test_match.vim @ 10287:1c1fcf515607 v8.0.0040

commit https://github.com/vim/vim/commit/8507747600bddfd6a68aed057840856bf5548e61 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Oct 16 14:35:48 2016 +0200 patch 8.0.0040 Problem: Whole line highlighting with matchaddpos() does not work. Solution: Check for zero length. (Hirohito Higashi)
author Christian Brabandt <cb@256bit.org>
date Sun, 16 Oct 2016 14:45:04 +0200
parents 489eae19cad9
children f9de19f981a4
line wrap: on
line diff
--- a/src/testdir/test_match.vim
+++ b/src/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