mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-04 14:46:03 +00:00
scroll-window remote control command: Fix a regression that broke scrolling by pages
Fixes #10253
This commit is contained in:
parent
f935258394
commit
368753682d
2 changed files with 4 additions and 1 deletions
|
|
@ -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]
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue