fix single-step downwards scrolling in tog; broken by previous
diff --git a/tog/tog.c b/tog/tog.c
index d8bdfb1..aee813b 100644
--- a/tog/tog.c
+++ b/tog/tog.c
@@ -622,11 +622,11 @@ show_log_view(struct got_object_id *start_id, struct got_repository *repo)
case 'j':
case KEY_DOWN:
nparents = num_parents(first_displayed_entry);
- if (selected >= nparents - 1)
- break;
- if (selected < LINES - 1)
+ if (selected < LINES - 1 &&
+ selected < nparents - 1)
selected++;
- if (selected < LINES - 1)
+ if (selected < LINES - 1 &&
+ selected < nparents - 1)
break;
err = scroll_down(&first_displayed_entry, 1,
last_displayed_entry, &commits, repo);