From: Steve Hancock Date: Tue, 1 Nov 2022 16:43:09 +0000 (-0700) Subject: fix b1421 X-Git-Tag: 20221112~13 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=4c07aea15216593b99fad717db67c9f2ac80a175;p=perltidy.git fix b1421 --- diff --git a/dev-bin/run_convergence_tests.pl.data b/dev-bin/run_convergence_tests.pl.data index dec68116..751b294c 100644 --- a/dev-bin/run_convergence_tests.pl.data +++ b/dev-bin/run_convergence_tests.pl.data @@ -10777,6 +10777,35 @@ if ( ioctl( STDERR, $TIOCGWINSZ, --indent-columns=5 --vertical-tightness-closing=1 +==> b1421.in <== +if ( L2hos + ->Link( + $image2, $image1, + ) ) +{ +L2hos + ->Unlink($tmp); +} + +if ( + L2hos + ->Link( + $image2, $image1, + ) ) +{ +L2hos + ->Unlink($tmp); +} + +==> b1421.par <== +--break-at-old-method-breakpoints +--extended-line-up-parentheses +--indent-columns=0 +--maximum-line-length=23 +--paren-vertical-tightness-closing=1 +--paren-vertical-tightness=1 +--weld-nested-containers + ==> b146.in <== # State 1 diff --git a/lib/Perl/Tidy/Formatter.pm b/lib/Perl/Tidy/Formatter.pm index b8b1ad8d..ef2d6ef0 100644 --- a/lib/Perl/Tidy/Formatter.pm +++ b/lib/Perl/Tidy/Formatter.pm @@ -9966,10 +9966,11 @@ sub weld_nested_containers { # protection against instability. The line difference of '2' # worked for b1402, but needs to be '3' to include b1419 because # it has -vtc>0 which can add more uncertainty. + # And for case b1421 it had to be increased to '4'. if ( %opening_vertical_tightness && $opening_vertical_tightness{$token_oo} ) { - if ( $iline_oc - $iline_oo <= 3 ) { + if ( $iline_oc - $iline_oo <= 4 ) { $rmax_vertical_tightness->{$outer_seqno} = 0; } }