Fix not taking clipping into account when calculating colum remainder (#3357)

This commit is contained in:
daxpedda 2023-09-18 21:08:17 +02:00 committed by GitHub
parent 6870d141d7
commit ad8b41cad6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -648,7 +648,9 @@ impl<'a> Table<'a> {
// If the last column is 'remainder', then let it fill the remainder!
let eps = 0.1; // just to avoid some rounding errors.
*column_width = available_width - eps;
*column_width = column_width.at_least(max_used_widths[i]);
if !column.clip {
*column_width = column_width.at_least(max_used_widths[i]);
}
*column_width = width_range.clamp(*column_width);
break;
}