From: Steve Hancock Date: Sat, 18 Sep 2021 13:32:15 +0000 (-0700) Subject: fix git #73, -nfpva not working correctly X-Git-Tag: 20210717.03~3 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=e3b4a6ff413c756eeea0e86ab86e70c5f1c1d38f;p=perltidy.git fix git #73, -nfpva not working correctly --- diff --git a/lib/Perl/Tidy/Formatter.pm b/lib/Perl/Tidy/Formatter.pm index 2bf07c48..68bf5bfd 100644 --- a/lib/Perl/Tidy/Formatter.pm +++ b/lib/Perl/Tidy/Formatter.pm @@ -20142,6 +20142,7 @@ EOM my ( $self, $ri_first, $ri_last ) = @_; my $rspecial_side_comment_type = $self->[_rspecial_side_comment_type_]; + my $ris_function_call_paren = $self->[_ris_function_call_paren_]; my $rLL = $self->[_rLL_]; my $ralignment_type_to_go; @@ -20356,20 +20357,10 @@ EOM } # Do not align a spaced-function-paren if requested. - # Issue git #53. Note that $i-1 is a blank token if we - # get here. - if ( !$rOpts_function_paren_vertical_alignment - && $i > $ibeg + 1 ) - { - my $type_m = $types_to_go[ $i - 2 ]; - my $token_m = $tokens_to_go[ $i - 2 ]; - - # this is the same test as 'space-function-paren' - if ( $type_m =~ /^[wUG]$/ - || $type_m eq '->' - || $type_m =~ /^[wi]$/ - && $token_m =~ /^(\&|->)/ ) - { + # Issue git #53, #73. + if ( !$rOpts_function_paren_vertical_alignment ) { + my $seqno = $type_sequence_to_go[$i]; + if ( $ris_function_call_paren->{$seqno} ) { $alignment_type = ""; } }