From 0da0d925850534e7040474c133be53a6a80bd752 Mon Sep 17 00:00:00 2001 From: Andrew Hamilton Date: Tue, 15 Mar 2022 13:01:38 +1000 Subject: [PATCH] Revert "fill3: Cope with negative interval fractions in scrollbars" This reverts commit b9455f393dbc6e614b2ef8adebf871903ab840dd. - Fixed the bug properly in diff-edit. --- fill3/fill3/__init__.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fill3/fill3/__init__.py b/fill3/fill3/__init__.py index 0efe3f2..cd38891 100755 --- a/fill3/fill3/__init__.py +++ b/fill3/fill3/__init__.py @@ -185,10 +185,9 @@ class ScrollBar: width, height = dimensions assert width == 1 or height == 1, (width, height) length = width if self._is_horizontal else height - interval = [abs(fraction) for fraction in self.interval] - assert all(0 <= fraction <= 1 for fraction in interval), interval + assert all(0 <= fraction <= 1 for fraction in self.interval), self.interval (start_index, start_remainder), (end_index, end_remainder) = \ - [divmod(fraction * length * 8, 8) for fraction in interval] + [divmod(fraction * length * 8, 8) for fraction in self.interval] start_index, end_index = int(start_index), int(end_index) start_remainder, end_remainder = int(start_remainder), int(end_remainder) if start_index == end_index: