From: Steve Hancock Date: Tue, 4 Jun 2019 00:35:33 +0000 (-0700) Subject: update for issue #9, cuddled map,sort,grep X-Git-Tag: 20190915~23 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=949a689f58f0bd256ef90cad91c3dd648b43d751;p=perltidy.git update for issue #9, cuddled map,sort,grep --- diff --git a/CHANGES.md b/CHANGES.md index 8c6fd31e..f6bf3732 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -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. diff --git a/lib/Perl/Tidy/Formatter.pm b/lib/Perl/Tidy/Formatter.pm index d2a1a57c..80b5580f 100644 --- a/lib/Perl/Tidy/Formatter.pm +++ b/lib/Perl/Tidy/Formatter.pm @@ -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; }