Fixed Pageup Occasionally Failing

Before, pageup failed when the page margins were greater than half the
screen width, because previous_screen_location() went backward by
screen_inline, which did not account for the margins but worked most of
the time due to later rounding. Now this has been fixed.

Signed-off-by: Morgan Seltzer <MorganSeltzer000@gmail.com>
This commit is contained in:
Morgan Seltzer 2021-06-17 12:42:18 -05:00
parent 87b85cac39
commit 501d6d0cf2

View File

@ -453,7 +453,7 @@ def previous_screen_location():
if is_full_screen_layout: if is_full_screen_layout:
return -1 return -1
cc = current_column_location() cc = current_column_location()
ans = cc - screen_inline ans = cc - cols_per_screen * col_and_gap
if ans < 0: if ans < 0:
# We ignore small scrolls (less than 15px) when going to previous # We ignore small scrolls (less than 15px) when going to previous
# screen # screen