Hi,
I've just found and fixed another, very similar to the previous ( 
http://groups.google.com/group/vim_dev/browse_thread/thread/6bd53b151b1bb7aa# ) 
bug in indent/perl.vim. This code:

sub fun {
    my (%params) = @_;
    
    for (my $i = 0; $i != 10; ++$i) {
}

    return;
}

after "gg=G" became:

sub fun {
    my (%params) = @_;
    
    for (my $i = 0; $i != 10; ++$i) {
    }

    return;
    }

i.e. last brace's indentation is wrong. Here is the fix:

diff /usr/local/share/vim/vim72/indent/perl.vim perl.vim 
136c136
<           \ || synid =~ '^perl\(Sub\|BEGINEND\|If\)Fold'
---
>           \ || synid =~ '^perl\(Sub\|BEGINEND\|If\|Block\|Package\)Fold'
151c151
<           \ || synid =~ '^perl\(Sub\|BEGINEND\|If\)Fold'
---
>           \ || synid =~ '^perl\(Sub\|BEGINEND\|If\|Block\|Package\)Fold'

Also, there is a bug in folding: when i'm trying to fold the "sub fun" line 
with "zc"command, only first 5 lines are folded, not the whole subroutine. Can 
anybody suggest where to look?

Sending a copy to the maintainer of the indent file, hoping he will do 
something about - these little bugs are very annoying.


      
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Attachment: indent.patch
Description: Binary data

Raspunde prin e-mail lui