]> git.donarmstrong.com Git - perltidy.git/commitdiff
update for issue #9, cuddled map,sort,grep
authorSteve Hancock <perltidy@users.sourceforge.net>
Tue, 4 Jun 2019 00:35:33 +0000 (17:35 -0700)
committerSteve Hancock <perltidy@users.sourceforge.net>
Tue, 4 Jun 2019 00:35:33 +0000 (17:35 -0700)
CHANGES.md
lib/Perl/Tidy/Formatter.pm

index 8c6fd31ef9ff2c790d11880fb869e6db2ec3be86..f6bf37327d5061e999e5b794f018be550a76efa5 100644 (file)
@@ -2,6 +2,10 @@
 
 ## 2019 06 01.01
 
+    - some improved vertical alignments
+
+## 2019 06 01
+
     - rt #128477: Prevent inconsistent owner/group and setuid/setgid bits. 
       In the -b (--backup-and-modify-in-place) mode, an attempt is made to set ownership
       of the output file equal to the input file, if they differ.
index d2a1a57c7efaab3a4c5e7c2ac5382241ec0cab41..80b5580f90b02280699b56e37c371b8962208f05 100644 (file)
@@ -8114,7 +8114,12 @@ sub starting_one_line_block {
     # always a good idea to make as many one-line blocks as possible,
     # so other types are not done.  The user can always use -mangle.
     if ( $is_sort_map_grep_eval{$block_type} ) {
-        create_one_line_block( $i_start, 1 );
+
+       # Patch for issue git#9: do not try to form new one line blocks for a
+       # cuddled block type. For example, for flags -ce and -cbl='map,sort,grep'
+        if ( !$rcuddled_block_types->{'*'}->{$block_type} ) {
+            create_one_line_block( $i_start, 1 );
+        }
     }
     return 0;
 }