[vim] Make fzf#wrap support v:true and v:false as well

Fix #2087
This commit is contained in:
Junegunn Choi 2020-06-20 22:12:50 +09:00
parent 06d63a862e
commit 07a03b3e73
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627

View File

@ -297,7 +297,7 @@ function! fzf#wrap(...)
let expects = map(copy(args), 'type(v:val)') let expects = map(copy(args), 'type(v:val)')
let tidx = 0 let tidx = 0
for arg in copy(a:000) for arg in copy(a:000)
let tidx = index(expects, type(arg), tidx) let tidx = index(expects, type(arg) == 6 ? type(0) : type(arg), tidx)
if tidx < 0 if tidx < 0
throw 'Invalid arguments (expected: [name string] [opts dict] [fullscreen boolean])' throw 'Invalid arguments (expected: [name string] [opts dict] [fullscreen boolean])'
endif endif