From ae57e144e9abc95e5a08e598ecffbef05d152b87 Mon Sep 17 00:00:00 2001 From: Steve Hancock Date: Tue, 5 Apr 2022 07:22:02 -0700 Subject: [PATCH] fix unusual instability found in testing, b1332 --- dev-bin/run_convergence_tests.pl.data | 17 +++++++++++++++++ lib/Perl/Tidy/Formatter.pm | 12 +++++++----- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/dev-bin/run_convergence_tests.pl.data b/dev-bin/run_convergence_tests.pl.data index e44e3269..d1d4196b 100644 --- a/dev-bin/run_convergence_tests.pl.data +++ b/dev-bin/run_convergence_tests.pl.data @@ -9643,6 +9643,23 @@ WriteMakefile( --indent-columns=1 --square-bracket-vertical-tightness-closing=1 +==> b1332.in <== +# S1 + $b->configure ( + -text => $dayArray[$col], # disable the button + -state => 'disabled' ); + +# S2 + $b->configure ( -text => $dayArray[$col], # disable the button + -state => 'disabled' ); + +==> b1332.par <== +--extended-line-up-parentheses +--indent-columns=2 +--maximum-line-length=68 +--paren-vertical-tightness=2 +--space-function-paren + ==> b1333.in <== # S1 $_[ diff --git a/lib/Perl/Tidy/Formatter.pm b/lib/Perl/Tidy/Formatter.pm index 61f166cd..533c3b5d 100644 --- a/lib/Perl/Tidy/Formatter.pm +++ b/lib/Perl/Tidy/Formatter.pm @@ -11034,11 +11034,13 @@ sub collapsed_lengths { && $rLL->[$K_terminal]->[_TYPE_] eq ',' ) { my $Kend = $K_terminal; - if ( $Kend < $K_last - && !$rOpts_ignore_side_comment_lengths ) - { - $Kend = $K_last; - } + + # fix for b1332: side comments handled at end of loop + ##if ( $Kend < $K_last + ## && !$rOpts_ignore_side_comment_lengths ) + ##{ + ## $Kend = $K_last; + ##} # Measure from the next blank if any (fixes b1301) my $Kbeg = $KK; -- 2.39.5