outdent_long_lines => $outdent_long_lines,
rvertical_tightness_flags => $rvertical_tightness_flags,
level => $level,
+ level_end => $level_end,
Kend => $Kend,
}
);
end_group => $break_alignment_after,
Kend => $Kend,
ci_level => $ci_level,
+ level => $level,
+ level_end => $level_end,
imax_pair => -1,
}
);
my $outdent_long_lines = 0;
foreach my $item ( @{$rgroup_lines} ) {
- my ( $line, $line_len, $Kend ) = @{$item};
+ my ( $str, $str_len, $Kend ) = @{$item};
$self->valign_output_step_B(
{
leading_space_count => $leading_space_count,
- line => $line,
- line_length => $line_len,
+ line => $str,
+ line_length => $str_len,
side_comment_length => 0,
outdent_long_lines => $outdent_long_lines,
rvertical_tightness_flags => "",
level => $group_level,
+ level_end => $group_level,
Kend => $Kend,
}
);
my $maximum_field_index = $line->get_jmax();
my $rvertical_tightness_flags = $line->get_rvertical_tightness_flags();
my $Kend = $line->get_Kend();
+ my $level_end = $line->get_level_end();
# add any extra spaces
if ( $leading_space_count > $group_leader_length ) {
outdent_long_lines => $outdent_long_lines,
rvertical_tightness_flags => $rvertical_tightness_flags,
level => $level,
+ level_end => $level_end,
Kend => $Kend,
}
);
my $outdent_long_lines = $rinput->{outdent_long_lines};
my $rvertical_tightness_flags = $rinput->{rvertical_tightness_flags};
my $level = $rinput->{level};
+ my $level_end = $rinput->{level_end};
my $Kend = $rinput->{Kend};
my $last_level_written = $self->[_last_level_written_];
$seqno_string = $seqno_end;
- # handle any cached line ..
- # either append this line to it or write it out
- # Note: the function length() is used in this next test out of caution.
- # All testing has shown that the variable $cached_line_text_length is
- # correct, but its calculation is complex and a loss of cached text would
- # be a disaster.
+ # handle any cached line ..
+ # either append this line to it or write it out
+ # Note: the function length() is used in this next test out of caution.
+ # All testing has shown that the variable $cached_line_text_length is
+ # correct, but its calculation is complex and a loss of cached text
+ # would be a disaster.
if ( length($cached_line_text) ) {
# Dump an invalid cached line
}
}
- # Do not join the lines if this produces a line too long.
- # This prevents blinking caused by the combination -xci -pvt=2
- # in which a one-line block alternately forms and breaks,
- # causing -xci to alternately turn on and off (case b765).
- # This does not normally happen but can during stress testing.
- if ( $gap > 0 ) {
+ # Do not join the lines if this might produce a one-line
+ # container which exceeds the maximum line length. This is
+ # necessary prevent blinking, particularly with the combination
+ # -xci -pvt=2. In that case a one-line block alternately forms
+ # and breaks, causing -xci to alternately turn on and off (case
+ # b765).
+ if ( $gap >= 0 && defined($level_end) && $level > $level_end ) {
my $test_line_length =
- $cached_line_text_length + $gap + $str_length;
+ $cached_line_text_length + $gap + $str_length;
my $maximum_line_length =
$self->maximum_line_length_for_level($last_level_written);
_end_group_ => $i++,
_Kend_ => $i++,
_ci_level_ => $i++,
+ _level_ => $i++,
+ _level_end_ => $i++,
_imax_pair_ => $i++,
};
}
$self->[_end_group_] = $ri->{end_group};
$self->[_Kend_] = $ri->{Kend};
$self->[_ci_level_] = $ri->{ci_level};
+ $self->[_level_] = $ri->{level};
+ $self->[_level_end_] = $ri->{level_end};
$self->[_imax_pair_] = $ri->{imax_pair};
$self->[_ralignments_] = [];
sub get_indentation { return $_[0]->[_indentation_] }
sub get_Kend { return $_[0]->[_Kend_] }
sub get_ci_level { return $_[0]->[_ci_level_] }
+ sub get_level { return $_[0]->[_level_] }
+ sub get_level_end { return $_[0]->[_level_end_] }
sub get_list_seqno { return $_[0]->[_list_seqno_] }
sub get_imax_pair { return $_[0]->[_imax_pair_] }