Complete on buffer instead of reading file
This commit is contained in:
@@ -248,8 +248,8 @@ fun! TodoComplete(findstart, base)
|
||||
endwhile
|
||||
return start
|
||||
else
|
||||
let res = []
|
||||
let file = readfile(expand("%:p"))
|
||||
let res = []
|
||||
let lines=getline(1,"$")
|
||||
for line in lines
|
||||
if line =~ " ".a:base
|
||||
let item={}
|
||||
@@ -257,7 +257,7 @@ fun! TodoComplete(findstart, base)
|
||||
if a:base =~ '+'
|
||||
let item.info="Context: ".substitute(line,'.*\s\(@\S\S*\).*','\1',"")
|
||||
elseif a:base =~ '@'
|
||||
let l:pr=[]
|
||||
let l:pr=[]
|
||||
for line2 in lines
|
||||
if line2 =~ l:item.word
|
||||
call add(l:pr,substitute(line2,'.*\s\(+\S\S*\).*','\1',""))
|
||||
|
||||
Reference in New Issue
Block a user