diff options
author | wustho <benawiadha@gmail.com> | 2020-03-09 15:12:51 +0700 |
---|---|---|
committer | wustho <benawiadha@gmail.com> | 2020-03-09 15:12:51 +0700 |
commit | 8f8a81d96c6312e7eb6dfa26136c90b6f76862d2 (patch) | |
tree | ad32b4f29288f43fdc8cee64bb9d8f4fbc83ea68 /epy.py | |
parent | 07a00e1fbded5a792a5d11a692b88e770253aaf8 (diff) | |
download | epy-8f8a81d96c6312e7eb6dfa26136c90b6f76862d2.tar.gz |
Return resizing below 22x12 as stderr.
Diffstat (limited to 'epy.py')
-rwxr-xr-x | epy.py | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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: |