From 34c5658a6b79e8ad9cbf4624393e26ef06ed7b61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D0=B5=D1=80=D0=B3=D0=B5=D0=B9=20=D0=9C=D0=B0=D1=80?= =?UTF-8?q?=D0=B8=D0=BD=D0=BA=D0=B5=D0=B2=D0=B8=D1=87?= Date: Thu, 7 Apr 2022 16:10:45 +0700 Subject: [PATCH] fix navigation overflow --- igitlog.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/igitlog.py b/igitlog.py index e9138dd..6335411 100755 --- a/igitlog.py +++ b/igitlog.py @@ -28,6 +28,7 @@ for part in process.communicate(): if len(commits) == 0: + print("No repo?") sys.exit(0) stdscr = curses.initscr() @@ -81,7 +82,7 @@ while running: mvmt = stdscr.getch() if mvmt == ord('j'): - if pos < len(commits): + if pos < len(commits) - 1: pos += 1 if pos - offset > max_y - 2 and offset < len(commits) - max_y + 5: offset += 1