Commit Diff


commit - f9b5f5fbdf2ae49a4e217212d261d89d83dacd7e
commit + 8c28a2abbc4aeeb588826ad0010267d507e71ff8
blob - 40201c25f18ee7225e330e73140e4238037d66e3
blob + 43007666e1ffbbce67f7375be748a75aadbb074a
--- tog/tog.c
+++ tog/tog.c
@@ -4977,9 +4977,9 @@ search_next_view_match(struct tog_view *view)
 
 	if (*match) {
 		if (view->searching == TOG_SEARCH_FORWARD)
-			lineno = *match + 1;
+			lineno = *first + 1;
 		else
-			lineno = *match - 1;
+			lineno = *first - 1;
 	} else
 		lineno = *first - 1 + *selected;