Skip to content

Commit

Permalink
Merge pull request #228 from ThomasFeher/master
Browse files Browse the repository at this point in the history
fix bug #227 error in ReadTOC function
  • Loading branch information
lervag committed Jan 26, 2015
2 parents d3571d0 + d04afe5 commit b0a8486
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ftplugin/latex-box/motion.vim
Expand Up @@ -349,7 +349,7 @@ function! s:ReadTOC(auxfile, texfile, ...)
if len(tree) > 3 && empty(tree[1])
call remove(tree, 1)
endif
if len(tree) > 1 && tree[0] =~ '^\\\(numberline\|tocsection\)'
if len(tree) > 1 && type(tree[0]) == type("") && tree[0] =~ '^\\\(numberline\|tocsection\)'
let secnum = LatexBox_TreeToTex(tree[1])
let secnum = substitute(secnum, '\\\S\+\s', '', 'g')
let secnum = substitute(secnum, '\\\S\+{\(.\{-}\)}', '\1', 'g')
Expand Down

0 comments on commit b0a8486

Please sign in to comment.