]> git.donarmstrong.com Git - perltidy.git/commitdiff
fix benign error (csc goes out on last line only)
authorSteve Hancock <perltidy@users.sourceforge.net>
Sun, 29 Dec 2019 15:24:55 +0000 (07:24 -0800)
committerSteve Hancock <perltidy@users.sourceforge.net>
Sun, 29 Dec 2019 15:24:55 +0000 (07:24 -0800)
lib/Perl/Tidy/Formatter.pm

index e16faf9d4e0702be25aa69013da029ac9a51bc75..b967aed57980350b0c934481c3317760eca85cb9 100644 (file)
@@ -10038,8 +10038,8 @@ sub send_lines_to_vertical_aligner {
               && !grep { /^[\?\:]$/ } @types_to_go[ $ibeg + 1 .. $iend ];
         }
 
-        # add any closing side comment
-        if ( $closing_side_comment && @{$rfields} ) {
+        # add any closing side comment to the last line
+        if ( $closing_side_comment && $n == $n_last_line && @{$rfields} ) {
             $rfields->[-1] .= " $closing_side_comment";
         }