Get scroll_window working

This commit is contained in:
Kovid Goyal
2022-08-31 20:58:22 +05:30
parent bacca88213
commit 0a2455c8be
3 changed files with 17 additions and 17 deletions

View File

@@ -69,7 +69,7 @@ using this option means that you will not be notified of failures.
window.screen.reverse_scroll(int(abs(amt)), True)
else:
unit = 'page' if unit == 'p' else 'line'
if unit == 'page' and not amt.is_integer():
if unit == 'page' and not isinstance(amt, int) and not amt.is_integer():
amt = round(window.screen.lines * amt)
unit = 'line'
direction = 'up' if amt < 0 else 'down'