Ticket #653: 653.patch

File 653.patch, 582 bytes (added by patrickas, 4 years ago)

file : http://svn.perlide.org/padre/trunk/PPIx-EditorTools/lib/PPIx/EditorTools.pm

  • EditorTools.pm

     
    244244        return $cursor->parent; 
    245245    } 
    246246 
     247    # This finds variable declarations if you're above it and it has the form my ($foo , $bar); 
     248    if($cursor->parent->isa('PPI::Statement::Expression')  && $cursor->parent->parent->parent->isa('PPI::Statement::Variable')  ) { 
     249        return $cursor->parent->parent->parent; 
     250    } 
     251 
    247252    while (1) { 
    248253        $prev_cursor = $cursor; 
    249254        $cursor      = $cursor->parent;