]> git.donarmstrong.com Git - perltidy.git/commitdiff
added a missing flush check; needed for future coding
authorSteve Hancock <perltidy@users.sourceforge.net>
Thu, 21 May 2020 13:29:30 +0000 (06:29 -0700)
committerSteve Hancock <perltidy@users.sourceforge.net>
Thu, 21 May 2020 13:29:30 +0000 (06:29 -0700)
lib/Perl/Tidy/VerticalAligner.pm

index 7badc8aeb8a4bafa3adb52a6b324014332fa9ddd..786b71c340bf644aed96c68b5b8c0c7cc476289b 100644 (file)
@@ -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();
             }