Commit d2ad595c2cf140e23c761ef62916dbc49b40f66b

Stefan Sperling 2020-04-09T10:48:58

fix "searching..." displayed in tog log view while merely scrolling down

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/tog/tog.c b/tog/tog.c
index 505f372..ce5000c 100644
--- a/tog/tog.c
+++ b/tog/tog.c
@@ -1512,7 +1512,8 @@ draw_commits(struct tog_view *view, struct commit_queue_entry **last,
 	if (commits_needed > 0) {
 		if (asprintf(&ncommits_str, " [%d/%d] %s",
 		    entry ? entry->idx + 1 : 0, commits->ncommits,
-		    view->searching ? "searching..." : "loading...") == -1) {
+		    (view->searching && !view->search_next_done) ?
+		    "searching..." : "loading...") == -1) {
 			err = got_error_from_errno("asprintf");
 			goto done;
 		}