--vertical-tightness=2
--weld-nested-containers
+==> b1186.in <==
+# S1
+sub null_to_zzempty { }
+sub entab {
+
+ return
+ $table->{
+ null_to_zzempty ( $row )
+ }->{ null_to_zzempty ( $col ) };
+}
+
+# S2
+sub null_to_zzemptY { }
+
+sub entaB {
+
+ return
+ $table->{ null_to_zzemptY (
+ $row ) }
+ ->{ null_to_zzemptY ( $col ) };
+}
+
+==> b1186.par <==
+--indent-columns=10
+--line-up-parentheses
+--maximum-line-length=44
+--paren-tightness=0
+--paren-vertical-tightness=2
+--space-function-paren
+
==> b120.in <==
# Same as bug96
# State 1
BEGIN {
# Added 'w' to fix b1172
- my @q = qw(k w i Z);
+ my @q = qw(k w i Z ->);
@is_kwiZ{@q} = (1) x scalar(@q);
}
+use constant DEBUG_FIND_START => 0;
+
sub find_token_starting_list {
# When testing to see if a block will fit on one line, some
# a previous comma is a good break point
# $i_opening_minus = $i_opening_paren;
}
- elsif ( $tokens_to_go[$i_opening_paren] eq '(' ) {
+
+ elsif (
+ $tokens_to_go[$i_opening_paren] eq '('
+
+ # non-parens added here to fix case b1186
+ || $is_kwiZ{$type_prev_nb}
+ )
+ {
$i_opening_minus = $im1;
# Walk back to improve length estimate...
if ( $types_to_go[$i_opening_minus] eq 'b' ) { $i_opening_minus++ }
}
- # Handle non-parens
- elsif ( $is_kwiZ{$type_prev_nb} ) { $i_opening_minus = $iprev_nb }
-
RETURN:
+ DEBUG_FIND_START && print <<EOM;
+FIND_START: i=$i_opening_paren tok=$tokens_to_go[$i_opening_paren] => im=$i_opening_minus tok=$tokens_to_go[$i_opening_minus]
+EOM
+
return $i_opening_minus;
}
=over 4
+=item B<Fix edge case of formatting instability, b1186>.
+
+Testing with random parameters produced a case of instability involving
+parameter -lp -pvt=n and a short maximum line length.
+
+This fixes case b1186.
+
+2 Aug 2021.
+
=item B<Fix edge case of formatting instability, b1185>.
Testing with random parameters produced a case of welding instability involving