Commit Diff


commit - b235acd40a3c3c6aa95b8cb0ab813f4155dbc0fd
commit + aa61903a98391367c09cf4130a838a7ee4b73791
blob - 65bbc598def6a6724f242787e83b1315f0119b53
blob + 6682116ce8b01263a346aa10379da1ca4959bc69
--- tog/tog.c
+++ tog/tog.c
@@ -3709,6 +3709,7 @@ input_diff_view(struct tog_view **new_view, struct tog
 		wclear(view->window);
 		s->first_displayed_line = 1;
 		s->last_displayed_line = view->nlines;
+		s->matched_line = 0;
 		diff_view_indicate_progress(view);
 		err = create_diff(s);
 		break;
@@ -3767,6 +3768,7 @@ input_diff_view(struct tog_view **new_view, struct tog
 	case '[':
 		if (s->diff_context > 0) {
 			s->diff_context--;
+			s->matched_line = 0;
 			diff_view_indicate_progress(view);
 			err = create_diff(s);
 			if (s->first_displayed_line + view->nlines - 1 >
@@ -3779,6 +3781,7 @@ input_diff_view(struct tog_view **new_view, struct tog
 	case ']':
 		if (s->diff_context < GOT_DIFF_MAX_CONTEXT) {
 			s->diff_context++;
+			s->matched_line = 0;
 			diff_view_indicate_progress(view);
 			err = create_diff(s);
 		}
@@ -3803,6 +3806,7 @@ input_diff_view(struct tog_view **new_view, struct tog
 
 		s->first_displayed_line = 1;
 		s->last_displayed_line = view->nlines;
+		s->matched_line = 0;
 
 		diff_view_indicate_progress(view);
 		err = create_diff(s);
@@ -3827,6 +3831,7 @@ input_diff_view(struct tog_view **new_view, struct tog
 
 		s->first_displayed_line = 1;
 		s->last_displayed_line = view->nlines;
+		s->matched_line = 0;
 
 		diff_view_indicate_progress(view);
 		err = create_diff(s);
@@ -4379,6 +4384,7 @@ run_blame(struct tog_view *view)
 		s->last_displayed_line = view->nlines;
 		s->selected_line = 1;
 	}
+	s->matched_line = 0;
 
 done:
 	if (blob)