From 23913e0598d23ec5948b71ea78c549b39cecf764 Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Sun, 8 Mar 2015 21:32:50 -0700 Subject: Update --- ftplugin/latex-box/motion.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ftplugin/latex-box') diff --git a/ftplugin/latex-box/motion.vim b/ftplugin/latex-box/motion.vim index 7e5b0011..66b9e4fc 100644 --- a/ftplugin/latex-box/motion.vim +++ b/ftplugin/latex-box/motion.vim @@ -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 && type(tree[0]) == type("") && tree[0] =~ '^\\\(numberline\|tocsection\)' + if len(tree) > 1 && type(tree[0]) == type("") && tree[0] =~ '^\\\(\(chapter\)\?numberline\|tocsection\)' let secnum = LatexBox_TreeToTex(tree[1]) let secnum = substitute(secnum, '\\\S\+\s', '', 'g') let secnum = substitute(secnum, '\\\S\+{\(.\{-}\)}', '\1', 'g') @@ -359,7 +359,7 @@ function! s:ReadTOC(auxfile, texfile, ...) " parse section title let text = LatexBox_TreeToTex(tree) let text = substitute(text, '^{\+\|}\+$', '', 'g') - let text = substitute(text, '\m^\\\(no\)\?numberline\s*', '', '') + let text = substitute(text, '\m^\\\(no\)\?\(chapter\)\?numberline\s*', '', '') let text = substitute(text, '\*', '', 'g') " add TOC entry -- cgit v1.2.3