fix navigation overflow
This commit is contained in:
+2
-1
@@ -28,6 +28,7 @@ for part in process.communicate():
|
|||||||
|
|
||||||
|
|
||||||
if len(commits) == 0:
|
if len(commits) == 0:
|
||||||
|
print("No repo?")
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
stdscr = curses.initscr()
|
stdscr = curses.initscr()
|
||||||
@@ -81,7 +82,7 @@ while running:
|
|||||||
|
|
||||||
mvmt = stdscr.getch()
|
mvmt = stdscr.getch()
|
||||||
if mvmt == ord('j'):
|
if mvmt == ord('j'):
|
||||||
if pos < len(commits):
|
if pos < len(commits) - 1:
|
||||||
pos += 1
|
pos += 1
|
||||||
if pos - offset > max_y - 2 and offset < len(commits) - max_y + 5:
|
if pos - offset > max_y - 2 and offset < len(commits) - max_y + 5:
|
||||||
offset += 1
|
offset += 1
|
||||||
|
|||||||
Reference in New Issue
Block a user