Fixed #531: Error in cite compl. of thebibliography
This commit is contained in:
parent
8d75f01cdd
commit
7244f48322
@ -198,16 +198,19 @@ function! s:bib.search(regexp) dict " {{{2
|
||||
" Find data from 'thebibliography' environments
|
||||
let lines = readfile(b:vimtex.tex)
|
||||
if match(lines, '\C\\begin{thebibliography}') >= 0
|
||||
for line in filter(filter(lines, 'v:val =~# ''\C\\bibitem'''),
|
||||
for line in filter(filter(lines,
|
||||
\ 'v:val =~# ''\C\\bibitem'''),
|
||||
\ 'v:val =~ a:regexp')
|
||||
let match = matchlist(line, '\\bibitem{\([^}]*\)')[1]
|
||||
let matches = matchlist(line, '\\bibitem\(\[[^]]\]\)\?{\([^}]*\)')
|
||||
if len(matches) > 1
|
||||
call add(res, {
|
||||
\ 'key': match,
|
||||
\ 'key': matches[2],
|
||||
\ 'type': '',
|
||||
\ 'author': '',
|
||||
\ 'year': '',
|
||||
\ 'title': match,
|
||||
\ 'title': matches[2],
|
||||
\ })
|
||||
endif
|
||||
endfor
|
||||
endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user