Commit Diff


commit - 26f0cb24072c223eeabed2bc6c655a8b134e2424
commit + 528dedf3fe0051922cb1a66083fce16ac0057753
blob - 6634343663f70f87b50980785c135d40e05bc323
blob + b9c4abb82f4c3a2becb00e1847dfbb0ef461c37e
--- tog/tog.c
+++ tog/tog.c
@@ -2389,16 +2389,20 @@ input_log_view(struct tog_view **new_view, struct tog_
 	struct tog_view *ref_view = NULL;
 	int begin_x = 0;
 
-	switch (ch) {
-	case ERR: /* no user input from wgetch() */
-		if (s->thread_args.load_all && s->thread_args.log_complete) {
+	if (s->thread_args.load_all) {
+		if (ch == KEY_BACKSPACE)
 			s->thread_args.load_all = 0;
+		else if (s->thread_args.log_complete) {
+			s->thread_args.load_all = 0;
 			log_scroll_down(view, s->commits.ncommits);
 			s->selected = MIN(view->nlines - 2,
 			    s->commits.ncommits - 1);
 			select_commit(s);
 		}
-		break;
+		return NULL;
+	}
+
+	switch (ch) {
 	case 'q':
 		s->quit = 1;
 		break;
@@ -2542,11 +2546,6 @@ input_log_view(struct tog_view **new_view, struct tog_
 	case KEY_BACKSPACE:
 	case CTRL('l'):
 	case 'B':
-		if (s->thread_args.load_all) {
-			if (ch == KEY_BACKSPACE)
-				s->thread_args.load_all = 0;
-			break;
-		}
 		if (ch == KEY_BACKSPACE &&
 		    got_path_is_root_dir(s->in_repo_path))
 			break;