mirror of
https://github.com/vim/vim.git
synced 2025-10-02 05:04:20 -04:00
patch 7.4.2160
Problem: setmatches() mixes up values. (Nikolai Pavlov) Solution: Save the string instead of reusing a shared buffer.
This commit is contained in:
@@ -194,3 +194,12 @@ func Test_funcref()
|
||||
let OneByRef = funcref('One')
|
||||
call assert_equal(2, OneByRef())
|
||||
endfunc
|
||||
|
||||
func Test_setmatches()
|
||||
hi def link 1 Comment
|
||||
hi def link 2 PreProc
|
||||
let set = [{"group": 1, "pattern": 2, "id": 3, "priority": 4, "conceal": 5}]
|
||||
let exp = [{"group": '1', "pattern": '2', "id": 3, "priority": 4, "conceal": '5'}]
|
||||
call setmatches(set)
|
||||
call assert_equal(exp, getmatches())
|
||||
endfunc
|
||||
|
Reference in New Issue
Block a user