From 66d9753ec75a618c3013613435b46776e18b9ba6 Mon Sep 17 00:00:00 2001 From: Steve Hancock Date: Fri, 18 Mar 2022 06:39:53 -0700 Subject: [PATCH] fix unusual formatting issues b1317 1321 --- lib/Perl/Tidy/Formatter.pm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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 } } } -- 2.39.5