The attached patch fixes mishandling of Perl indent levels when folding
is enabled.
GetPerlSyntax() was testing for the syntax items 'perlBEGINENDFold' and
'perlIfFold', neither of which exists any more. The patch tests for
'perlBlockFold' instead. ('perlPackageFold' doesn't affect testing for
braces).
--
Best,
Ben
--
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.phpdiff -r 903fcd726d90 runtime/indent/perl.vim
--- a/runtime/indent/perl.vim Thu Feb 11 18:54:43 2010 +0100
+++ b/runtime/indent/perl.vim Sat Feb 13 12:55:28 2010 -0500
@@ -133,7 +133,7 @@
\ || synid == "perlMatchStartEnd"
\ || synid == "perlHereDoc"
\ || synid =~ "^perlFiledescStatement"
- \ || synid =~ '^perl\(Sub\|BEGINEND\|If\)Fold'
+ \ || synid =~ '^perl\(Sub\|Block\)Fold'
let brace = strpart(line, bracepos, 1)
if brace == '(' || brace == '{'
let ind = ind + &sw
@@ -148,7 +148,7 @@
let synid = synIDattr(synID(v:lnum, bracepos, 0), "name")
if synid == ""
\ || synid == "perlMatchStartEnd"
- \ || synid =~ '^perl\(Sub\|BEGINEND\|If\)Fold'
+ \ || synid =~ '^perl\(Sub\|Block\)Fold'
let ind = ind - &sw
endif
endif