Merge branch 'fix-page-scroll' of https://github.com/rivenirvana/kitty

This commit is contained in:
Kovid Goyal 2026-01-23 22:49:22 +05:30
commit 19d632f3fc
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -78,7 +78,8 @@ def response_from_kitty(self, boss: Boss, window: Window | None, payload_get: Pa
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