Fixed another bug with TOC includes (#518)
This commit is contained in:
parent
0aa85a6c9d
commit
3d86795eb1
@ -211,15 +211,13 @@ function! vimtex#toc#get_entries() " {{{1
|
|||||||
" Note: We do some "magic" in order to filter out the TOC entries that are
|
" Note: We do some "magic" in order to filter out the TOC entries that are
|
||||||
" not necessaries. In other words, we only want to keep TOC entries
|
" not necessaries. In other words, we only want to keep TOC entries
|
||||||
" for included files that do not have other TOC entries inside them.
|
" for included files that do not have other TOC entries inside them.
|
||||||
if l:file ==# l:included.prev
|
if l:file !=# l:included.prev
|
||||||
if l:included.toc_length < len(l:toc)
|
let l:included.prev = l:file
|
||||||
|
let l:included.current.entries = len(l:toc) - l:included.toc_length
|
||||||
let l:included.toc_length = len(l:toc)
|
let l:included.toc_length = len(l:toc)
|
||||||
let l:included.current.entries += 1
|
|
||||||
endif
|
|
||||||
else
|
|
||||||
if index(l:included.files, l:file) < 0
|
if index(l:included.files, l:file) < 0
|
||||||
let l:included.files += [l:file]
|
let l:included.files += [l:file]
|
||||||
let l:included.prev = l:file
|
|
||||||
let l:included.current = {
|
let l:included.current = {
|
||||||
\ 'title' : 'Included: ' . fnamemodify(l:file, ':t'),
|
\ 'title' : 'Included: ' . fnamemodify(l:file, ':t'),
|
||||||
\ 'number' : '',
|
\ 'number' : '',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user