aboutsummaryrefslogtreecommitdiffstats
path: root/epy.py
diff options
context:
space:
mode:
authorwustho <benawiadha@gmail.com>2020-03-09 15:12:51 +0700
committerwustho <benawiadha@gmail.com>2020-03-09 15:12:51 +0700
commit8f8a81d96c6312e7eb6dfa26136c90b6f76862d2 (patch)
treead32b4f29288f43fdc8cee64bb9d8f4fbc83ea68 /epy.py
parent07a00e1fbded5a792a5d11a692b88e770253aaf8 (diff)
downloadepy-8f8a81d96c6312e7eb6dfa26136c90b6f76862d2.tar.gz
Return resizing below 22x12 as stderr.
Diffstat (limited to 'epy.py')
-rwxr-xr-xepy.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/epy.py b/epy.py
index e86da5d..6d34515 100755
--- a/epy.py
+++ b/epy.py
@@ -14,7 +14,7 @@ Options:
"""
-__version__ = "2020.3.7"
+__version__ = "2020.3.8"
__license__ = "MIT"
__author__ = "Benawi Adha"
__url__ = "https://github.com/wustho/epy"
@@ -1107,6 +1107,8 @@ def reader(ebook, index, width, y, pctg, sect):
else:
rows, cols = SCREEN.getmaxyx()
curses.resize_term(rows, cols)
+ if cols < 22 or rows < 12:
+ sys.exit("ERR: Screen was too small.")
if cols <= width:
return 0, cols - 2, 0, y/totlines, ""
else: