my $level = $rLL->[$Kref]->[_LEVEL_];
my $ci_level = $rLL->[$Kref]->[_CI_LEVEL_];
- if ( !$rOpts_variable_maximum_line_length ) {
+ $starting_indent = $rOpts_indent_columns * $level +
+ $ci_level * $rOpts_continuation_indentation;
- $starting_indent = $rOpts_indent_columns * $level +
- $ci_level * $rOpts_continuation_indentation;
-
- # Switch to using the outer opening token as the reference
- # point if a line break before it would make a longer line.
- # Fixes case b1055 and is also an alternate fix for b1065.
- my $level_oo = $rLL->[$Kouter_opening]->[_LEVEL_];
- if ( $Kref < $Kouter_opening ) {
- my $ci_level_oo = $rLL->[$Kouter_opening]->[_CI_LEVEL_];
- my $lentot_oo =
- $rLL->[ $Kouter_opening - 1 ]->[_CUMULATIVE_LENGTH_];
- my $starting_indent_oo = $rOpts_indent_columns * $level_oo +
- $ci_level_oo * $rOpts_continuation_indentation;
- if ( $lentot_oo - $starting_lentot <
- $starting_indent_oo - $starting_indent )
- {
- $Kref = $Kouter_opening;
- $level = $level_oo;
- $ci_level = $ci_level_oo;
- $starting_lentot = $lentot_oo;
- $starting_indent = $starting_indent_oo;
- }
+ # Switch to using the outer opening token as the reference
+ # point if a line break before it would make a longer line.
+ # Fixes case b1055 and is also an alternate fix for b1065.
+ my $level_oo = $rLL->[$Kouter_opening]->[_LEVEL_];
+ if ( $Kref < $Kouter_opening ) {
+ my $ci_level_oo = $rLL->[$Kouter_opening]->[_CI_LEVEL_];
+ my $lentot_oo =
+ $rLL->[ $Kouter_opening - 1 ]->[_CUMULATIVE_LENGTH_];
+ my $starting_indent_oo = $rOpts_indent_columns * $level_oo +
+ $ci_level_oo * $rOpts_continuation_indentation;
+ if ( $lentot_oo - $starting_lentot <
+ $starting_indent_oo - $starting_indent )
+ {
+ $Kref = $Kouter_opening;
+ $level = $level_oo;
+ $ci_level = $ci_level_oo;
+ $starting_lentot = $lentot_oo;
+ $starting_indent = $starting_indent_oo;
}
}
+ # Revised -vmll treatment to fix cases b866 b1074 b1075 b1084 b1086
+ # b1087 b1088
+ if ($rOpts_variable_maximum_line_length) {
+ $starting_indent -= $level * $rOpts_indent_columns;
+ }
+
# Avoid problem areas with the -wn -lp combination.
# The combination -wn -lp -dws -naws does not work well and can
# cause blinkers. See case b1020. It will probably only occur
=over 4
+=item B<Improve treatment of -vmll with -wn>
+
+Random testing showed a weakness in the treatment of the -vmll flag
+in combination with the -wn flag. This has been fixed.
+
+This fixes cases b866 b1074 b1075 b1084 b1086 b1087 b1088
+
+8 Apr 2021.
+
=item B<Merge weld rule 6 into rule 3>
One of the welding rules, RULE 6, has been merged into RULE 3 for
The updated code is less restrictive and fixes some cases
recently found with random testing, b1078 b1091.
-8 Apr 2021.
+8 Apr 2021, f28ab55.
=item B<Moved logic of previous update to the FileWriter module>
general to handle all possible parameter combinations. The problem was solved
and simplified by moving the logic to a lower level, in the FileWriter module.
-6 Apr 2021.
+6 Apr 2021, 756e930.
=item B<Fix problem with excess blank line generation with -blao>
When run, blank lines keep getting generated until the maximum is reached.
This has been fixed.
-6 Apr 2021.
+6 Apr 2021, 9216298.
=item B<Fix edge case involving -wn and -lp or -bbao>