From: Steve Hancock Date: Sun, 29 Dec 2019 15:24:55 +0000 (-0800) Subject: fix benign error (csc goes out on last line only) X-Git-Tag: 20200110~8 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=d2ac1751d329d9c060684ec708df36cc489f6abd;p=perltidy.git fix benign error (csc goes out on last line only) --- diff --git a/lib/Perl/Tidy/Formatter.pm b/lib/Perl/Tidy/Formatter.pm index e16faf9d..b967aed5 100644 --- a/lib/Perl/Tidy/Formatter.pm +++ b/lib/Perl/Tidy/Formatter.pm @@ -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"; }