diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2013-09-27 10:21:44 +0200 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2013-09-27 10:21:44 +0200 |
commit | b6a2261cc20a6d8f044207d4bcc953143e5d225a (patch) | |
tree | 77dd2f52297bd1c5c4665be6f2bb956276b0364a /ftplugin | |
parent | 811fe888a6ee4cee6194aae7aedd7afc93c6e303 (diff) | |
download | vim-polyglot-b6a2261cc20a6d8f044207d4bcc953143e5d225a.tar.gz vim-polyglot-b6a2261cc20a6d8f044207d4bcc953143e5d225a.zip |
Update rust and latex
Diffstat (limited to 'ftplugin')
-rw-r--r-- | ftplugin/latex-box/motion.vim | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ftplugin/latex-box/motion.vim b/ftplugin/latex-box/motion.vim index 6d35a59d..fea4e5f2 100644 --- a/ftplugin/latex-box/motion.vim +++ b/ftplugin/latex-box/motion.vim @@ -344,10 +344,11 @@ function! s:ReadTOC(auxfile, texfile, ...) let page = '' endif " parse section number + let secnum = '' if len(tree[1]) > 3 && empty(tree[1][1]) call remove(tree[1], 1) endif - if len(tree[1]) > 1 + if len(tree[1]) > 1 && tree[1][0] =~ '\(numberline\|tocsection\)' if !empty(tree[1][1]) let secnum = LatexBox_TreeToTex(tree[1][1]) let secnum = substitute(secnum, '\\\S\+\s', '', 'g') @@ -356,12 +357,12 @@ function! s:ReadTOC(auxfile, texfile, ...) endif let tree = tree[1][2:] else - let secnum = '' let tree = tree[1] endif " parse section title let text = LatexBox_TreeToTex(tree) let text = substitute(text, '^{\+\|}\+$', '', 'g') + let text = substitute(text, '\*', '', 'g') " add TOC entry call add(fileindices[texfile], len(toc)) |