Merge branch 'fix-rc-scroll-win' of https://github.com/page-down/kitty

This commit is contained in:
Kovid Goyal 2021-12-11 12:40:18 +05:30
commit 5084f843c9
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -40,9 +40,8 @@ class ScrollWindow(RemoteCommand):
if amt not in ('start', 'end'):
pages = 'p' in amt
unscroll = 'u' in amt
amt = amt.replace('p', '')
mult = -1 if amt.endswith('-') and not unscroll else 1
q = int(amt.replace('-', ''))
q = int(amt.rstrip('+-pu'))
amount = q * mult, 'p' if pages else ('u' if unscroll else 'l')
return {'match': opts.match, 'amount': amount}