From: Steve Hancock Date: Fri, 11 Sep 2020 23:31:46 +0000 (-0700) Subject: fixed rare bug involving incorrect cache writing order X-Git-Tag: 20200907.01~17 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=1def82ff72d6f0fe28bc95bf83042ab469d4f91b;p=perltidy.git fixed rare bug involving incorrect cache writing order --- diff --git a/lib/Perl/Tidy/VerticalAligner.pm b/lib/Perl/Tidy/VerticalAligner.pm index 5160ac37..17171fd9 100644 --- a/lib/Perl/Tidy/VerticalAligner.pm +++ b/lib/Perl/Tidy/VerticalAligner.pm @@ -186,15 +186,17 @@ sub flush { # flush() is the external call to completely empty the pipeline. my ($self) = @_; - # the buffer must be emptied first - $self->dump_valign_buffer(); + # push things out the pipline... - # then any current group + # push out any current group lines $self->_flush_group_lines(); - # then the cache, which may still contain text if there was - # no group + # then anything left in the cache of step_B $self->_flush_cache(); + + # then anything left in the buffer of step_C + $self->dump_valign_buffer(); + return; }