appending array configuration into map

Close #301
This commit is contained in:
Yasuhiro Matsumoto
2015-10-20 09:03:46 +09:00
parent abdf10e91c
commit fceb37243a

View File

@@ -140,7 +140,15 @@ function! emmet#mergeConfig(lhs, rhs) abort
if !has_key(lhs, key) if !has_key(lhs, key)
let lhs[key] = [] let lhs[key] = []
endif endif
let lhs[key] += rhs[key] if type(lhs[key]) == 3
let lhs[key] += rhs[key]
elseif type(lhs[key]) == 4
let vals = map(keys(lhs[key]), '{v:val : lhs[key][v:val]}')
for V in rhs[key]
let vals += [V]
endfor
let lhs[key] = vals
endif
elseif type(rhs[key]) ==# 4 elseif type(rhs[key]) ==# 4
if has_key(lhs, key) if has_key(lhs, key)
call emmet#mergeConfig(lhs[key], rhs[key]) call emmet#mergeConfig(lhs[key], rhs[key])