Fix duplicate namespaces in completion

This commit is contained in:
Tim Pope 2014-11-30 00:53:32 -05:00
parent 874505e9f2
commit 0ecd9ec587

View File

@ -90,7 +90,7 @@ function! fireplace#omnicomplete(findstart, base) abort
if fireplace#op_available('complete') if fireplace#op_available('complete')
let response = fireplace#message({'op': 'complete', 'symbol': a:base}) let response = fireplace#message({'op': 'complete', 'symbol': a:base})
let trans = '(v:val =~# ''\.'' ? "" : matchstr(a:base, ''^.\+/'')) . v:val' let trans = '{"word": (v:val =~# ''[./]'' ? "" : matchstr(a:base, ''^.\+/'')) . v:val}'
let value = get(response[0], 'value', get(response[0], 'completions')) let value = get(response[0], 'value', get(response[0], 'completions'))
if type(value) == type([]) if type(value) == type([])
if type(get(value, 0)) == type([]) if type(get(value, 0)) == type([])