Commit 8df4052c7d6d3a88a3e8e827e7863f090e68efb3

Stefan Sperling 2018-05-20T14:27:52

fix selection of last entry when scrolling tog log view

diff --git a/tog/tog.c b/tog/tog.c
index a1ae0b1..e489741 100644
--- a/tog/tog.c
+++ b/tog/tog.c
@@ -658,13 +658,12 @@ show_log_view(struct got_object_id *start_id, struct got_repository *repo)
 				if (selected < LINES - 1 &&
 				    selected < nparents - 1)
 					selected++;
-				if (selected < LINES - 1 &&
-				    selected < nparents - 1)
-					break;
-				err = scroll_down(&first_displayed_entry, 1,
-				    last_displayed_entry, &commits, repo);
-				if (err)
-					goto done;
+				else {
+					err = scroll_down(&first_displayed_entry, 1,
+					    last_displayed_entry, &commits, repo);
+					if (err)
+						goto done;
+				}
 				break;
 			case KEY_NPAGE:
 				nparents = num_parents(first_displayed_entry);