From 617b01a5b6aa3cadb25b2ff8639e330cfc6cf3c1 Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Tue, 11 Nov 2014 02:37:21 +0100 Subject: Update --- ftplugin/latextoc.vim | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'ftplugin/latextoc.vim') diff --git a/ftplugin/latextoc.vim b/ftplugin/latextoc.vim index 8edf23d1..65315dea 100644 --- a/ftplugin/latextoc.vim +++ b/ftplugin/latextoc.vim @@ -87,8 +87,12 @@ function! s:TOCActivate(close) endfor " Find section in buffer (or inputted files) - call s:TOCFindMatch('\\' . entry['level'] . '\_\s*{' . titlestr . '}', - \ duplicates, files) + if entry['level'] == 'label' + let re = '\(\\label\_\s*{\|label\s*=\s*\)' . titlestr . '\>' + else + let re = '\\' . entry['level'] . '\_\s*{' . titlestr . '}' + endif + call s:TOCFindMatch(re, duplicates, files) if a:close if g:LatexBox_split_resize -- cgit v1.2.3