temp fix for imprecision in may_progress_with_offset

better idea: check once at the start of the region

if there are non-header rows, or we could progress at the start of the region, we may progress
This commit is contained in:
PgBiel 2025-05-06 03:42:02 -03:00
parent 07a060a9da
commit dafcf8b11e

View File

@ -1802,6 +1802,9 @@ pub(super) fn points(
/// additional logic which adds content automatically on each region turn (in
/// our case, headers).
pub(super) fn may_progress_with_offset(regions: Regions<'_>, offset: Abs) -> bool {
// Use 'approx_eq' as float addition and subtraction are not associative.
!regions.backlog.is_empty()
|| regions.last.is_some_and(|height| regions.size.y + offset != height)
|| regions
.last
.is_some_and(|height| !(regions.size.y + offset).approx_eq(height))
}