fix: Revert changes to page scrolling

This commit is contained in:
Arvin Verain
2026-01-24 01:01:14 +08:00
parent ae36822837
commit 8c3e59d87a

View File

@@ -78,7 +78,8 @@ using this option means that you will not be notified of failures.
if not isinstance(amt, int) and not amt.is_integer():
amt = round(window.screen.lines * amt)
unit = 'line'
func = window.scroll_page_up if amt < 0 else window.scroll_page_down
direction = 'up' if amt < 0 else 'down'
func = getattr(window, f'scroll_{unit}_{direction}')
for i in range(int(abs(amt))):
func()
return None