Fixed a minor bug

This commit is contained in:
Karl Yngve Lervåg 2013-11-21 10:35:54 +01:00
parent b6b4efb772
commit 0444b53db7

View File

@ -165,7 +165,7 @@ function! s:bibtex_search(regexp)
" Find data from 'thebibliography' environments
let lines = readfile(g:latex#data[b:latex.id].tex)
if match(lines, '\C\\begin{thebibliography}')
if match(lines, '\C\\begin{thebibliography}') >= 0
for line in filter(filter(lines, 'v:val =~ ''\C\\bibitem'''),
\ 'v:val =~ a:regexp')
let match = matchlist(line, '\\bibitem{\([^}]*\)')[1]