fixed normalize_candidates when string

This commit is contained in:
Prabir Shrestha
2018-02-24 20:32:25 -08:00
parent 3ee5f249ea
commit c8d2f7a3fc
+2 -2
View File
@@ -248,14 +248,14 @@ function! s:normalize_candidates(name, candidates) abort
else
let l:e = copy(l:item)
endif
let l:normalizedcurcandidates += [l:e]
call add(l:normalizedcurcandidates, l:e)
endfor
else
if !empty(a:candidates)
if type(a:candidates[0]) == type('')
call asyncomplete#log('s:normalize_candidates', 'normalizing string candidates', a:name)
for l:item in a:candidates
let l:normalizedcurcandidates += { 'word': l:item }
call add(l:normalizedcurcandidates, { 'word': l:item })
endfor
else
call asyncomplete#log('s:normalize_candidates', 'ignoring candidates normalization', a:name)