Better handling of multi buffer completion

CHG: Recognise done.txt format for project and context completion
ADD: Show buffer name in which the project/context exists
This commit is contained in:
David Beniamine
2015-06-09 23:57:26 +02:00
parent 7e06e5aafd
commit a17560cc01

View File

@@ -251,7 +251,7 @@ fun! TodoComplete(findstart, base)
let res = []
for bufnr in range(1,bufnr('$'))
let lines=getbufline(bufnr,1,"$")
for line in lines
for line in lines
if line =~ "[x\s0-9\-]*([a-Z]).* ".a:base
let item={}
let item.word=substitute(line,'.*\('.a:base.'\S*\).*','\1',"")
@@ -265,6 +265,7 @@ fun! TodoComplete(findstart, base)
endif
endfor
let item.info="Projects: ".join(uniq(l:pr), " ")
endif
let item.info.="\nBuffer: ".bufname(bufnr)
call add(res,item)
endif