From f8ad215d25e6bbaafbb309b9d844209b78eb6d48 Mon Sep 17 00:00:00 2001 From: Jurica Bradaric Date: Sat, 30 Jan 2016 11:33:20 +0100 Subject: vim-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) https://github.com/vim/vim/commit/0fce4257727f9d75e488963b73e407d31dd46546 --- test/functional/legacy/063_match_and_matchadd_spec.lua | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test') diff --git a/test/functional/legacy/063_match_and_matchadd_spec.lua b/test/functional/legacy/063_match_and_matchadd_spec.lua index a354d4d328..23b4f4551b 100644 --- a/test/functional/legacy/063_match_and_matchadd_spec.lua +++ b/test/functional/legacy/063_match_and_matchadd_spec.lua @@ -89,7 +89,11 @@ describe('063: Test for ":match", "matchadd()" and related functions', function( execute("call clearmatches()") execute("call setmatches(ml)") eq(ml, eval('getmatches()')) + + -- Check that "setmatches()" can correctly restore the matches from matchaddpos() execute("call clearmatches()") + execute("call setmatches(ml)") + eq(ml, eval('getmatches()')) -- Check that "setmatches()" will not add two matches with the same ID. The -- expected behaviour (for now) is to add the first match but not the -- cgit