From: Steve Hancock Date: Fri, 21 May 2021 18:06:23 +0000 (-0700) Subject: Modify welding rules for -lp X-Git-Tag: 20210402.01~35 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=a4ec4c16de903bff9742c5afb02252a4298a6c89;p=perltidy.git Modify welding rules for -lp --- diff --git a/lib/Perl/Tidy/Formatter.pm b/lib/Perl/Tidy/Formatter.pm index 27db51b9..29b1e894 100644 --- a/lib/Perl/Tidy/Formatter.pm +++ b/lib/Perl/Tidy/Formatter.pm @@ -7622,8 +7622,9 @@ EOM # this line has an unbalanced start. This helps prevent # blinkers in unusual cases for lines near the length limit # by making it more likely that RULE 2 will prevent a weld. - my $level_diff = - $outer_opening->[_LEVEL_] - $rLL->[$Kfirst]->[_LEVEL_]; + # FIX3: for b1131: only use level difference in -lp mode. + my $level_diff = $rOpts_line_up_parentheses + && $outer_opening->[_LEVEL_] - $rLL->[$Kfirst]->[_LEVEL_]; if ( !$level_diff || $excess + $rOpts_indent_columns <= 0 ) { diff --git a/local-docs/BugLog.pod b/local-docs/BugLog.pod index 840a6743..1b856f37 100644 --- a/local-docs/BugLog.pod +++ b/local-docs/BugLog.pod @@ -2,6 +2,15 @@ =over 4 +=item B + +This is an update to the patch 19 Apr 2021, eeeaf09. It restricts that patch +to -lp formatting mode. + +This fixes case b1131. + +21 May 2021. + =item B Random testing produced a formatting instability involving the combination of