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