Fixed a bug in s:parsePairs.
Somtimes Dscanner writes extra data before the results, so we only show lines with a word, than space, than a single character.
This commit is contained in:
parent
e99268503f
commit
8475dc5dfd
|
@ -46,7 +46,7 @@ function! dcomplete#Complete(findstart,base)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
echo "hi"
|
||||||
"Run dscanner
|
"Run dscanner
|
||||||
function! s:runDScanner(scanCommand)
|
function! s:runDScanner(scanCommand)
|
||||||
if exists('g:dscanner_path')
|
if exists('g:dscanner_path')
|
||||||
|
@ -73,7 +73,7 @@ function! s:parsePairs(base,resultLines,addBefore,addAfter)
|
||||||
for resultLine in a:resultLines[1:]
|
for resultLine in a:resultLines[1:]
|
||||||
if len(resultLine)
|
if len(resultLine)
|
||||||
let lineParts=split(resultLine)
|
let lineParts=split(resultLine)
|
||||||
if lineParts[0]=~'^'.a:base
|
if lineParts[0]=~'^'.a:base && 2==len(lineParts) && 1==len(lineParts[1])
|
||||||
call add(result,{'word':a:addBefore.lineParts[0].a:addAfter,'kind':lineParts[1]})
|
call add(result,{'word':a:addBefore.lineParts[0].a:addAfter,'kind':lineParts[1]})
|
||||||
endif
|
endif
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue