From 8475dc5dfd968034345487a51a5e4139b616004a Mon Sep 17 00:00:00 2001 From: IdanArye Date: Sun, 25 Nov 2012 17:15:01 +0200 Subject: [PATCH] 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. --- editors/vim/autoload/dcomplete.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/editors/vim/autoload/dcomplete.vim b/editors/vim/autoload/dcomplete.vim index 7ee2812..3d99797 100644 --- a/editors/vim/autoload/dcomplete.vim +++ b/editors/vim/autoload/dcomplete.vim @@ -46,7 +46,7 @@ function! dcomplete#Complete(findstart,base) endif endif endfunction - +echo "hi" "Run dscanner function! s:runDScanner(scanCommand) if exists('g:dscanner_path') @@ -73,7 +73,7 @@ function! s:parsePairs(base,resultLines,addBefore,addAfter) for resultLine in a:resultLines[1:] if len(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]}) endif end