mirror of
https://github.com/mattn/emmet-vim.git
synced 2026-03-08 06:16:45 +08:00
Fix mergeConfig() list merge bug
When merging two lists, l:rhi is a value from iteration (not an index), so l:rhs[l:rhi] was incorrectly using values as indices. Changed to use l:rhi directly. Also removed the redundant l:lhs += l:rhs before the clear-and-rebuild loop.
This commit is contained in:
@@ -123,12 +123,11 @@ function! emmet#mergeConfig(lhs, rhs) abort
|
||||
let [l:lhs, l:rhs] = [a:lhs, a:rhs]
|
||||
if type(l:lhs) ==# 3
|
||||
if type(l:rhs) ==# 3
|
||||
let l:lhs += l:rhs
|
||||
if len(l:lhs)
|
||||
call remove(l:lhs, 0, len(l:lhs)-1)
|
||||
endif
|
||||
for l:rhi in l:rhs
|
||||
call add(l:lhs, l:rhs[l:rhi])
|
||||
call add(l:lhs, l:rhi)
|
||||
endfor
|
||||
elseif type(l:rhs) ==# 4
|
||||
let l:lhs += map(keys(l:rhs), '{v:val : l:rhs[v:val]}')
|
||||
|
||||
Reference in New Issue
Block a user