diff options
author | benadha <benawiadha@gmail.com> | 2019-10-25 16:37:01 +0700 |
---|---|---|
committer | benadha <benawiadha@gmail.com> | 2019-10-25 16:57:25 +0700 |
commit | b635668356848fe59fd4ac8ab6a899c0fda648aa (patch) | |
tree | 1a41dc10e2bfe9314571bd9f6cd309af6f84d4a0 /epy.py | |
parent | 046e5ea3ccbca1c8c0024ae56a408eac3d3208da (diff) | |
download | epy-b635668356848fe59fd4ac8ab6a899c0fda648aa.tar.gz |
More flexible on terminal resize, no more random error when resizing terminal agressively.
Diffstat (limited to 'epy.py')
-rw-r--r-- | epy.py | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -874,7 +874,11 @@ def reader(stdscr, ebook, index, width, y, pctg, sect): stdscr.clear() stdscr.refresh() - pad.refresh(y, 0, 0, x, rows-1, x+width) + # try except to be more flexible on terminal resize + try: + pad.refresh(y, 0, 0, x, rows-1, x+width) + except curses.error: + pass if sect != "": y = toc_secid.get(sect, 0) |