Commit Diff


commit - 6524637e4c42250d3584fc9bd12616d4c2e8d823
commit + bc6aae89c2eb2254cc7aa4297cd98af69ff62ea9
blob - 3bdc7f359be0b8329061a2a26847bd8a86a7b674
blob + 00edfdb7043b99a8442ce77fcf89ae1384e6e345
--- tog/tog.c
+++ tog/tog.c
@@ -1204,11 +1204,12 @@ scroll_down(struct commit_queue_entry **first_displaye
 
 	do {
 		pentry = TAILQ_NEXT(*last_displayed_entry, entry);
+		if (pentry == NULL)
+			*commits_needed = maxscroll + 20;
 		while (pentry == NULL) {
 			int errcode;
 			if (*log_complete)
 				break;
-			*commits_needed = maxscroll + 20;
 			errcode = pthread_cond_signal(need_commits);
 			if (errcode)
 				return got_error_set_errno(errcode);