diff options
author | benadha <benawiadha@gmail.com> | 2021-02-02 17:37:20 +0700 |
---|---|---|
committer | benadha <benawiadha@gmail.com> | 2021-02-02 17:37:20 +0700 |
commit | b573a9b8defe30e7291b7f39ec372c5d2a15e947 (patch) | |
tree | d00ccd580a0ab4c38bdb9b7ba479cf1b21e37351 /epy.py | |
parent | a15cb8e89b8f7c7a868748a75161366776a2a0ca (diff) | |
download | epy-b573a9b8defe30e7291b7f39ec372c5d2a15e947.tar.gz |
Better PageUp to prev index for doublespread
Diffstat (limited to 'epy.py')
-rwxr-xr-x | epy.py | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1715,7 +1715,10 @@ def reader(ebook, index, width, y, pctg, sect): elif k in K["PageUp"]: if y == 0 and index != 0: ANIMATE = "prev" - return -1, width, -(rows*SPREAD), None, "" + tmp_parser = HTMLtoLines() + tmp_parser.feed(ebook.get_raw_text(contents[index-1])) + tmp_parser.close() + return -1, width, rows*SPREAD*(len(tmp_parser.get_lines(width)[0])//(rows*SPREAD)), None, "" else: if y >= rows*SPREAD*count: ANIMATE = "prev" |