Revision: 1030
http://vim-latex.svn.sourceforge.net/vim-latex/?rev=1030&view=rev
Author: tmaas
Date: 2008-05-29 14:16:58 -0700 (Thu, 29 May 2008)
Log Message:
-----------
- merge foldingfix.dpatch from
http://ftp.de.debian.org/debian/pool/main/v/vim-latexsuite/vim-latexsuite_20060325-5.dsc
NOTE: The patch was modified, because line 14 in the patch should be a
removed line in folding.vim
- Make the extracting of the contents of \label a little better, i.e. work when
there exists a }-character in the same line after the \label
- Debian Bugreport with an example that breaks:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=246798
Modified Paths:
--------------
trunk/vimfiles/ftplugin/latex-suite/folding.vim
Modified: trunk/vimfiles/ftplugin/latex-suite/folding.vim
===================================================================
--- trunk/vimfiles/ftplugin/latex-suite/folding.vim 2008-05-29 20:21:53 UTC (rev 1029)
+++ trunk/vimfiles/ftplugin/latex-suite/folding.vim 2008-05-29 21:16:58 UTC (rev 1030)
@@ -284,7 +284,7 @@
" In other words, the pattern is safe, but not exact.
call AddSyntaxFoldItem('^\s*\\'.s.'{[^{}]*$','^[^}]*}',0,0)
else
- call AddSyntaxFoldItem('^\s*\\begin{'.s,'^\s*\\end{'.s,0,0)
+ call AddSyntaxFoldItem('^\s*\\begin{'.s,'\(^\|\s\)\s*\\end{'.s,0,0)
endif
endif
endwhile
@@ -362,7 +362,9 @@
end
elseif getline(i) =~ '\\label'
let label = matchstr(getline(i), '\\label{\zs.*')
- let label = substitute(label, '\zs}[^}]*$', '', '')
+ " :FIXME: this does not work when \label contains a
+ " newline or a }-character
+ let label = substitute(label, '\([^}]*\)}.*$', '\1', '')
end
let i = i + 1
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|