From 74920d16697c77754a51eddbc90af2d05bf243b3 Mon Sep 17 00:00:00 2001 From: Steve Hancock Date: Sun, 30 Oct 2022 10:15:45 -0700 Subject: [PATCH] fix b1419 --- dev-bin/run_convergence_tests.pl.data | 23 +++++++++++++++++++++++ lib/Perl/Tidy/Formatter.pm | 5 +++-- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/dev-bin/run_convergence_tests.pl.data b/dev-bin/run_convergence_tests.pl.data index cfabffee..dec68116 100644 --- a/dev-bin/run_convergence_tests.pl.data +++ b/dev-bin/run_convergence_tests.pl.data @@ -10754,6 +10754,29 @@ if ( ioctl( STDERR, $TIOCGWINSZ, --paren-vertical-tightness=2 --weld-nested-containers +==> b1419.in <== + print ( + Tr( td( { -class => "forumTitle" }, + $info{"name"} ) + ), + + ); + + print ( + Tr( + td( { -class => "forumTitle" }, + $info{"name"} ) + ), + + ) ; + +==> b1419.par <== +--vertical-tightness=2 +--weld-nested-containers +--break-at-old-comma-breakpoints +--indent-columns=5 +--vertical-tightness-closing=1 + ==> b146.in <== # State 1 diff --git a/lib/Perl/Tidy/Formatter.pm b/lib/Perl/Tidy/Formatter.pm index 721a7dec..b8b1ad8d 100644 --- a/lib/Perl/Tidy/Formatter.pm +++ b/lib/Perl/Tidy/Formatter.pm @@ -9964,11 +9964,12 @@ sub weld_nested_containers { # Fixes b1402. This also fixes issues b1338, b1339, b1340, b1341, # b1342, b1343, but both fixes are needed in general for good # protection against instability. The line difference of '2' - # works but could be increased if necessary. + # worked for b1402, but needs to be '3' to include b1419 because + # it has -vtc>0 which can add more uncertainty. if ( %opening_vertical_tightness && $opening_vertical_tightness{$token_oo} ) { - if ( $iline_oc - $iline_oo <= 2 ) { + if ( $iline_oc - $iline_oo <= 3 ) { $rmax_vertical_tightness->{$outer_seqno} = 0; } } -- 2.39.5