aboutsummaryrefslogtreecommitdiffstats
path: root/epy.py
diff options
context:
space:
mode:
authorbenadha <benawiadha@gmail.com>2021-02-02 15:46:35 +0700
committerbenadha <benawiadha@gmail.com>2021-02-02 15:46:35 +0700
commita8674e4cb39609d3839e636b35a93eb9ee36a258 (patch)
treed6fb03f46cf92affc29e574556be0cf1c39581f8 /epy.py
parentb74cf629f17cbd5e822998165f7d7a37171e6982 (diff)
downloadepy-a8674e4cb39609d3839e636b35a93eb9ee36a258.tar.gz
(probably) Useless: if totlines - y < rows
Diffstat (limited to 'epy.py')
-rwxr-xr-xepy.py44
1 files changed, 15 insertions, 29 deletions
diff --git a/epy.py b/epy.py
index 0917e41..2a91527 100755
--- a/epy.py
+++ b/epy.py
@@ -1951,36 +1951,22 @@ def reader(ebook, index, width, y, pctg, sect):
SCREEN.clear()
SCREEN.addstr(0, 0, countstring)
SCREEN.refresh()
- if totlines - y < rows:
- if CFG["PageScrollAnimation"] and ANIMATE is not None:
- for i in range(width+1):
- curses.napms(1)
- # to optimize performance
- if i == width:
- # to cleanup screen from animation residue
- # actually only problematic for "next" animation
- # but just to be safe
- SCREEN.clear()
- SCREEN.refresh()
- if ANIMATE == "next":
- pad.refresh(y, 0, 0, x+width-i, totlines-y, x+width)
- elif ANIMATE == "prev":
- pad.refresh(y, width-i-1, 0, x, totlines-y, x+i)
- else:
- pad.refresh(y, 0, 0, x, totlines-y, x+width)
+ if CFG["PageScrollAnimation"] and ANIMATE is not None:
+ for i in range(width+1):
+ curses.napms(1)
+ # to optimize performance
+ if i == width:
+ # to cleanup screen from animation residue
+ # actually only problematic for "next" animation
+ # but just to be safe
+ SCREEN.clear()
+ SCREEN.refresh()
+ if ANIMATE == "next":
+ pad.refresh(y, 0, 0, x+width-i, rows-1, x+width)
+ elif ANIMATE == "prev":
+ pad.refresh(y, width-i-1, 0, x, rows-1, x+i)
else:
- if CFG["PageScrollAnimation"] and ANIMATE is not None:
- for i in range(width+1):
- curses.napms(1)
- if i == width:
- SCREEN.clear()
- SCREEN.refresh()
- if ANIMATE == "next":
- pad.refresh(y, 0, 0, x+width-i, rows-1, x+width)
- elif ANIMATE == "prev":
- pad.refresh(y, width-i-1, 0, x, rows-1, x+i)
- else:
- pad.refresh(y, 0, 0, x, rows-1, x+width)
+ pad.refresh(y, 0, 0, x, rows-1, x+width)
ANIMATE = None
LOCALSUMALLL = SUMALLLETTERS.value if MULTIPROC else SUMALLLETTERS