]> git.donarmstrong.com Git - perltidy.git/commitdiff
fix issue b1239, rare instability
authorSteve Hancock <perltidy@users.sourceforge.net>
Sun, 7 Nov 2021 23:21:30 +0000 (15:21 -0800)
committerSteve Hancock <perltidy@users.sourceforge.net>
Sun, 7 Nov 2021 23:21:30 +0000 (15:21 -0800)
dev-bin/run_convergence_tests.pl.data
lib/Perl/Tidy/Formatter.pm
local-docs/BugLog.pod

index cb9a057dc23223079a6df9bc5b2af84ad4d33edf..f79e19b0e763aa0194c8cf46d331a51ac3cd8121 100644 (file)
@@ -7991,6 +7991,26 @@ is(
 --paren-vertical-tightness-closing=1
 --variable-maximum-line-length
 
+==> b1239.in <==
+# S1
+(
+  sockaddr_in( getsockname ( $_[0]->[_SOCKET] ) )
+)[0];
+
+# S2
+( sockaddr_in( getsockname ( $_[0]->[_SOCKET] ) )
+)[0];
+
+==> b1239.par <==
+--continuation-indentation=10
+--indent-columns=0
+--line-up-parentheses
+--maximum-line-length=54
+--paren-vertical-tightness-closing=2
+--paren-vertical-tightness=1
+--space-keyword-paren
+--weld-nested-containers
+
 ==> b131.in <==
         unless
           ( open( SCORE, "+>>$Score_File" ) )
index 3c85cf3858bf5a30573d4cb0bbcdada2203c1aab..3a9a7021c433878a8eaa0d8ab47aab8e7fa641de 100644 (file)
@@ -8618,6 +8618,12 @@ EOM
             }
         } ## end starting new weld sequence
 
+        else {
+
+            # set the 1-line flag if continuing a weld sequence; fixes b1239
+            $is_one_line_weld = ( $iline_oo == $iline_oc );
+        }
+
         # DO-NOT-WELD RULE 2:
         # Do not weld an opening paren to an inner one line brace block
         # We will just use old line numbers for this test and require
index 2b4820f16fe3a67f7f8082b4bc492220319f4f38..d3bd2fd6e00e762083380ba79137f330e2f9df39 100644 (file)
@@ -64,7 +64,7 @@ This has been fixed.
 
    do $roff ( &verify($tpage) );
 
-20 Oct 2021.
+20 Oct 2021, 72e4bb1.
 
 =item B<Fix c091, incorrect closing side comment>
 
@@ -77,7 +77,7 @@ had empty strings as block names.  This was fixed in two ways.  First, the
 regex was fixed so that it cannot match an empty string.  Second, a test for
 an empty string was added.
 
-20 Oct 2021.
+20 Oct 2021, aa1a019.
 
 =item B<Issue c089, improve vertical alignment for lists without parens>