Mercurial > vim
diff src/testdir/test63.in @ 6849:f4e5704c5c43 v7.4.745
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)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Fri, 19 Jun 2015 16:32:57 +0200 |
parents | d51d47bd77c2 |
children |
line wrap: on
line diff
--- a/src/testdir/test63.in +++ b/src/testdir/test63.in @@ -187,7 +187,12 @@ STARTTEST :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