patch 7.4.745
Problem: The entries added by matchaddpos() are returned by getmatches()
but can't be set with setmatches(). (Lcd)
Solution: Fix setmatches(). (Christian Brabandt)
diff --git a/src/testdir/test63.in b/src/testdir/test63.in
index 1f073a7..03b2197 100644
--- a/src/testdir/test63.in
+++ b/src/testdir/test63.in
@@ -187,7 +187,12 @@
:else
: let @r .= "FAILED: " . v4 . "/" . v5 . "/" . v6 . "/" . v7 . "/" . v8 . "/" . v9 . "/" . v10 . "\n"
:endif
+:" Check, that setmatches() can correctly restore the matches from matchaddpos()
+:call matchadd('MyGroup1', '\%2lmatchadd')
+:let m=getmatches()
:call clearmatches()
+:call setmatches(m)
+:let @r .= string(getmatches())."\n"
G"rp
:/^Results/,$wq! test.out
ENDTEST