my $ci = $rLL->[$KK]->[_CI_LEVEL_];
next unless ($ci);
- # and only for broken lists.
- # Require container to span 3 or more line to avoid blinkers,
+ # Require a container to span 3 or more lines to avoid blinkers,
# so line difference must be 2 or more.
+ my $min_req = 2;
+
+ # But for -boc we want to see a break at an interior list comma to be
+ # sure the list stays broken. It is sufficient to require at least two
+ # non-blank lines within the block.
+ if ($rOpts_break_at_old_comma_breakpoints) {
+ my $iline = $rLL->[$KK]->[_LINE_INDEX_];
+ my $Knext = $self->K_next_nonblank($KK);
+ next unless ( defined($Knext) );
+ my $iline_next = $rLL->[$Knext]->[_LINE_INDEX_];
+ $min_req++ if ( $iline_next != $iline );
+ }
+
next
if (!$ris_broken_container->{$seqno}
- || $ris_broken_container->{$seqno} <= 1 );
+ || $ris_broken_container->{$seqno} < $min_req );
+
+ # TBD: This should work but needs testing Otherwise, it should always
+ # be ok to do this if there are three or more interior lines.
+ # goto OK if ($ris_broken_container->{$seqno} >= 4 );
# To avoid blinkers, we only want to change ci if this container
# will definitely be broken. We are doing this before the final
$starting_indent = $rOpts_indent_columns * $level +
( $ci - 1 ) * $rOpts_continuation_indentation;
- if ( $flag == 2 ) {
- $starting_indent += $rOpts_indent_columns;
- }
+## Use old level in length estimates
+## if ( $flag == 2 ) {
+## $starting_indent += $rOpts_indent_columns;
+## }
}
my $K_closing = $K_closing_container->{$seqno};
next unless defined($K_closing);
# Always OK to change ci if the net container length exceeds maximum
# line length
+ ## TBD: Needs TESTING: if ( $excess_length > $rOpts_continuation_indentation ) { goto OK }
if ( $excess_length > 0 ) { goto OK }
# Otherwise, not ok if -cab=2: the -cab=2 option tries to make a
my $rvertical_tightness_flags = [ 0, 0, 0, 0, 0, 0 ];
# The vertical tightness mechanism can add whitespace, so whitespace can
- # continually increase if we allowed it when the -fws flag is set.
+ # continually increase if we allowed it when the -fws flag is set.
# See case b499 for an example.
return $rvertical_tightness_flags if ($rOpts_freeze_whitespace);
=over 4
+=item B<fix some edge blinker cases involving -bbxi=n esp. with -boc>
+
+The following cases were fixed with this update:
+
+b041 b182 b184 b366 b367 b368 b370 b371 b382 b420 b432 b438 b464 b466 b467 b468
+b500 b501 b508 b509 b510 b512 b513 b514 b515 b516 b526 b528 b529 b531 b544 b545
+b547 b548 b549 b556 b557 b568 b571 b581 b583 b584 b585 b594 b595 b596 b597 b598
+b599 b600 b601 b602 b608 b041 b182 b184 b355 b356 b366 b367 b368 b371 b420 b432
+b464 b465 b466 b467 b468 b500 b501 b508 b509 b510 b512 b513 b514 b515 b516 b526
+b528 b529 b531 b544 b545 b547 b548 b549 b556 b557 b568 b571 b581 b583 b584
+
+28 Jan 2021.
+
=item B<fix problem with combination -cab=2 and bbhbi=n>
Random testing produced a number of cases in which the combination
b191 b211 b294 b309 b360 b363 b364 b365 b373 b386 b387 b388 b392 b437 b440 b472
b488 b489
-27 Jan 2021.
+27 Jan 2021, 6d710de.
=item B<fix problem with -freeze-whitespace>
b300 b303 b354 b374 b375 b383 b384 b402 b403 b404 b405 b436 b441 b445 b446 b471
b485 b498 b499
-27 Jan 2021.
+27 Jan 2021, 6d710de.
=item B<Avoid blinking states associated with -bbpi and similar flags>