retronews

a featureful fork of the luke8086/retronews hn+lobste.rs tui
Log | Files | Refs | README | LICENSE

commit 6bf1493fe5cdb8aa3e87029e4b434055a024aaa6
parent 9624cb5d6add780f037d71770ade150063d34ab1
Author: luke8086 <55237178+luke8086@users.noreply.github.com>
Date:   Mon, 25 Jul 2022 21:26:16 +0000

Require at least 80x25 terminal

Instead of making calls to addstr/insstr/chgat more complicated
with boundary checks

Diffstat:
Mretronews.py | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/retronews.py b/retronews.py @@ -619,6 +619,9 @@ def app_render(app: AppState) -> None: def app_compute_layout(app: AppState) -> Layout: (lines, cols) = app.screen.getmaxyx() + if lines < 25 or cols < 80: + raise Exception("At least 80x25 terminal is required") + index_start = 1 max_index_height = lines - 3 index_height = (max_index_height // 3) if app.pager_visible else max_index_height