summaryrefslogtreecommitdiffstats
path: root/ftplugin/latex-box
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2015-03-08 21:32:50 -0700
committerAdam Stankiewicz <sheerun@sher.pl>2015-03-08 21:32:50 -0700
commit23913e0598d23ec5948b71ea78c549b39cecf764 (patch)
treef21bd3dd20a7fe0e46bed7dd11329a204fe4cc3f /ftplugin/latex-box
parent1c2123117537fb4bccf87fcf39abc05eaf950ec2 (diff)
downloadvim-polyglot-1.12.1.tar.gz
vim-polyglot-1.12.1.zip
Updatev1.12.1
Diffstat (limited to 'ftplugin/latex-box')
-rw-r--r--ftplugin/latex-box/motion.vim4
1 files changed, 2 insertions, 2 deletions
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