From: Steve Hancock Date: Thu, 21 May 2020 13:29:30 +0000 (-0700) Subject: added a missing flush check; needed for future coding X-Git-Tag: 20200619~29 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=e0b9baf45be6064a5d17c34e2a71b8414a9c413a;p=perltidy.git added a missing flush check; needed for future coding --- diff --git a/lib/Perl/Tidy/VerticalAligner.pm b/lib/Perl/Tidy/VerticalAligner.pm index 7badc8ae..786b71c3 100644 --- a/lib/Perl/Tidy/VerticalAligner.pm +++ b/lib/Perl/Tidy/VerticalAligner.pm @@ -2149,6 +2149,9 @@ sub my_flush { # Start a new group if necessary if ( !@group_lines ) { add_to_group($new_line); + if ( $new_line->{_end_group} ) { + my_flush_code(); + } next; } @@ -2260,8 +2263,7 @@ sub my_flush { $is_matching_terminal_line = 0; } - # Optional optimization; end the group if we know we cannot match - # next line. + # end the group if we know we cannot match next line. elsif ( $new_line->{_end_group} ) { my_flush_code(); }