From: Steve Hancock Date: Thu, 8 Oct 2020 18:40:06 +0000 (-0700) Subject: fix -xci to work with -lp X-Git-Tag: 20201001.01~9 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=5648c591296b0284348f3585ce128fea85e2fcc6;p=perltidy.git fix -xci to work with -lp --- diff --git a/lib/Perl/Tidy/Formatter.pm b/lib/Perl/Tidy/Formatter.pm index 2080b03d..cdaef1c1 100644 --- a/lib/Perl/Tidy/Formatter.pm +++ b/lib/Perl/Tidy/Formatter.pm @@ -16617,8 +16617,13 @@ sub get_seqno { my $Kbeg = $K_to_go[$ibeg]; my $seqno = $rseqno_which_extended_ci->{$Kbeg}; if ( $seqno && $undo_extended_ci{$seqno} ) { - $ci_levels_to_go[$ibeg] = 0; - $leading_spaces_to_go[$ibeg] = $reduced_spaces_to_go[$ibeg]; + + # but do not undo ci set by the -lp flag + if ( !ref( $reduced_spaces_to_go[$ibeg] ) ) { + $ci_levels_to_go[$ibeg] = 0; + $leading_spaces_to_go[$ibeg] = + $reduced_spaces_to_go[$ibeg]; + } } }