Revert "fill3: Cope with negative interval fractions in scrollbars"
This reverts commit b9455f393d.
- Fixed the bug properly in diff-edit.
This commit is contained in:
parent
51700abd3a
commit
0da0d92585
1 changed files with 2 additions and 3 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue