Fixed a critical bug in source searching using tags

This commit is contained in:
Alexey Balchunas 2015-09-05 23:38:24 +07:00
parent 30218447f8
commit d6513dfb88

View File

@ -60,7 +60,7 @@ function! s:getTagContainingString(tag, str)
let l:tags = taglist(a:tag)
if (len(l:tags) > 0)
for l:tag in l:tags
if (filereadable(l:tag.filename) && (len(a:str) == 0 || match(readfile(l:tag.filename), a:str)))
if (filereadable(l:tag.filename) && match(readfile(l:tag.filename), a:str) >= 0)
return l:tag
endif
endfor