From: Steve Hancock Date: Fri, 18 Mar 2022 13:39:53 +0000 (-0700) Subject: fix unusual formatting issues b1317 1321 X-Git-Tag: 20220217.02~9 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=66d9753ec75a618c3013613435b46776e18b9ba6;p=perltidy.git fix unusual formatting issues b1317 1321 --- diff --git a/lib/Perl/Tidy/Formatter.pm b/lib/Perl/Tidy/Formatter.pm index 73ce02c4..5731345b 100644 --- a/lib/Perl/Tidy/Formatter.pm +++ b/lib/Perl/Tidy/Formatter.pm @@ -1515,8 +1515,8 @@ EOM #------------------------------------------------------------------- # The combination -xlp and -vmll can be unstable unless -iscl is set #------------------------------------------------------------------- - # This is a temporary fix for issue b1302. See also b1306, b1310. - # FIXME: look for a better fix. + # This is a temporary fix for issue b1310. FIXME: look for a better fix. + # No longer needed for b1302, b1306. if ( $rOpts->{'variable-maximum-line-length'} && $rOpts->{'extended-line-up-parentheses'} && !$rOpts->{'ignore-side-comment-lengths'} ) @@ -10938,10 +10938,11 @@ sub collapsed_lengths { ## $Kend = $K_last; ##} - $len = $rLL->[$Kend]->[_CUMULATIVE_LENGTH_] - + # changed from $len to my $leng to fix b1302 b1306 b1317 b1321 + my $leng = $rLL->[$Kend]->[_CUMULATIVE_LENGTH_] - $rLL->[ $K_first - 1 ]->[_CUMULATIVE_LENGTH_]; - if ( $len > $max_prong_len ) { $max_prong_len = $len } + if ( $leng > $max_prong_len ) { $max_prong_len = $leng } } }