From: Steve Hancock Date: Sun, 24 Nov 2024 15:36:18 +0000 (-0800) Subject: fix b1500 X-Git-Tag: 20240903.07~7 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=3d8386e6be5b2784844289b358da4a3ce094d68f;p=perltidy.git fix b1500 --- diff --git a/dev-bin/run_convergence_tests.pl.data b/dev-bin/run_convergence_tests.pl.data index 8503f2b1..4e2f20a7 100644 --- a/dev-bin/run_convergence_tests.pl.data +++ b/dev-bin/run_convergence_tests.pl.data @@ -12484,6 +12484,23 @@ a b c d e ); --opening-paren-right --break-after-all-operators +==> b1500.in <== +$config = { + delay => 5, ppid => $$, +}; +$config = { + delay => 5, + ppid => $$ +}; + +==> b1500.par <== +--comma-arrow-breakpoints=2 +--add-trailing-commas +--want-trailing-commas='i' +--delete-trailing-commas +--keep-old-breakpoints-after='t q .= ^.= .. i x R -> J' +--break-at-trailing-comma-types='1' + ==> b156.in <== # State 1 { diff --git a/dev-bin/run_convergence_tests.pl.expect b/dev-bin/run_convergence_tests.pl.expect index 940c2a96..b107cee7 100644 --- a/dev-bin/run_convergence_tests.pl.expect +++ b/dev-bin/run_convergence_tests.pl.expect @@ -8439,6 +8439,16 @@ my @abc ( ( $_[0] > 0 ) ? 1 : 0 ); +==> b1500 <== +$config = { + delay => 5, + ppid => $$, +}; +$config = { + delay => 5, + ppid => $$, +}; + ==> b156 <== # State 1 { diff --git a/lib/Perl/Tidy/Formatter.pm b/lib/Perl/Tidy/Formatter.pm index 85e588b1..daf4ea64 100644 --- a/lib/Perl/Tidy/Formatter.pm +++ b/lib/Perl/Tidy/Formatter.pm @@ -32191,7 +32191,9 @@ EOM $last_old_breakpoint_count # or user wants to form long blocks with arrows - || $cab_flag == 2 + # check on _rbreak_container_ added for b1500 + || ( $cab_flag == 2 + && !$self->[_rbreak_container_]->{$type_sequence} ) ) # and we made breakpoints between the opening and closing