From e0b9baf45be6064a5d17c34e2a71b8414a9c413a Mon Sep 17 00:00:00 2001 From: Steve Hancock Date: Thu, 21 May 2020 06:29:30 -0700 Subject: [PATCH] added a missing flush check; needed for future coding --- lib/Perl/Tidy/VerticalAligner.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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(); } -- 2.39.5