Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite
In directory sc8-pr-cvs1:/tmp/cvs-serv19367
Modified Files:
folding.vim
Log Message:
Change: rename FoldSections to Tex_FoldSections
Fix: Tex_FoldSections creates a pattern like '^\s*\\'.name
as the start fold pattern for a section. This is wrong when
name == '%%fakesection'
Index: folding.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/folding.vim,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** folding.vim 1 Dec 2003 05:17:32 -0000 1.20
--- folding.vim 2 Dec 2003 10:50:54 -0000 1.21
***************
*** 36,40 ****
endfunction " }}}
! " FoldSections: creates section folds {{{
" Author: Zhang Linbo
" Description:
--- 36,40 ----
endfunction " }}}
! " Tex_FoldSections: creates section folds {{{
" Author: Zhang Linbo
" Description:
***************
*** 45,49 ****
"
" **works recursively**
! function! FoldSections(lst, endpat)
let i = match(a:lst, ',')
if i > 0
--- 45,49 ----
"
" **works recursively**
! function! Tex_FoldSections(lst, endpat)
let i = match(a:lst, ',')
if i > 0
***************
*** 52,59 ****
let s = a:lst
endif
! let s = '^\s*\\' . s . '\W'
let endpat = s . '\|' . a:endpat
if i > 0
! call FoldSections(strpart(a:lst,i+1), endpat)
endif
let endpat = '^\s*\\appendix\W\|' . endpat
--- 52,63 ----
let s = a:lst
endif
! if s =~ '%%fakesection'
! let s = '^\s*' . s
! else
! let s = '^\s*\\' . s . '\W'
! endif
let endpat = s . '\|' . a:endpat
if i > 0
! call Tex_FoldSections(strpart(a:lst,i+1), endpat)
endif
let endpat = '^\s*\\appendix\W\|' . endpat
***************
*** 277,281 ****
" Sections {{{
if g:Tex_FoldedSections != ''
! call FoldSections(g:Tex_FoldedSections,
\ '^\s*\\frontmatter\|^\s*\\mainmatter\|^\s*\\backmatter\|'
\. '^\s*\\begin{thebibliography\|>>>\|^\s*\\endinput\|'
--- 281,285 ----
" Sections {{{
if g:Tex_FoldedSections != ''
! call Tex_FoldSections(g:Tex_FoldedSections,
\ '^\s*\\frontmatter\|^\s*\\mainmatter\|^\s*\\backmatter\|'
\. '^\s*\\begin{thebibliography\|>>>\|^\s*\\endinput\|'
|