From 368753682d9f7ef242c0b86197d8ffff41e4369d Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 12 Jul 2026 09:59:34 +0530 Subject: [PATCH] scroll-window remote control command: Fix a regression that broke scrolling by pages Fixes #10253 --- docs/changelog.rst | 2 ++ kitty/rc/scroll_window.py | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index ce7e3512f..0941f4cd6 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -224,6 +224,8 @@ Detailed list of changes - :opt:`cursor_trail_start_threshold` now optionally accepts two values to set x (horizontal) and y (vertical) thresholds independently (:iss:`10246`) +- scroll-window remote control command: Fix a regression that broke scrolling by pages (:iss:`10253`) + 0.47.4 [2026-06-15] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/kitty/rc/scroll_window.py b/kitty/rc/scroll_window.py index 5cc86befa..a73bcc87d 100644 --- a/kitty/rc/scroll_window.py +++ b/kitty/rc/scroll_window.py @@ -76,13 +76,14 @@ using this option means that you will not be notified of failures. case 'l': window.scroll_fractional_lines(amt) case 'p': + unit = 'page' if not isinstance(amt, int) and not amt.is_integer(): amt = round(window.screen.lines * amt) unit = 'line' assert isinstance(amt, int) direction = 'up' if amt < 0 else 'down' func = getattr(window, f'scroll_{unit}_{direction}') - for i in range(int(abs(amt))): + for _ in range(int(abs(amt))): func() return None