Commit Diff


commit - df5e841d09305f99fc2b172349b1caf24bf1e10b
commit + b74feda6c03e98dfcfc9b50c418817ee34ae4f51
blob - 6bb3d20611de9bd51888a5832be3b5d253fe08d5
blob + 2cd38d958da069a6ea0f4dc0c8d700f10af211cd
--- tog/tog.c
+++ tog/tog.c
@@ -2358,18 +2358,19 @@ search_next_log_view(struct tog_view *view)
 		 * If user has moved cursor after we hit the match, position
 		 * from where we should continue search must be changed.
 		 */
-		if (view->searching == TOG_SEARCH_FORWARD)
+		if (view->searching == TOG_SEARCH_FORWARD) {
 			if (matched_idx > selected_idx)
 				entry = TAILQ_NEXT(s->selected_entry, entry);
 			else
 				entry = TAILQ_NEXT(s->matched_entry, entry);
-		else
+		} else {
 			if (matched_idx < selected_idx)
 				entry = TAILQ_PREV(s->selected_entry,
 						commit_queue_head, entry);
 			else
 				entry = TAILQ_PREV(s->matched_entry,
 						commit_queue_head, entry);
+		}
 	} else {
 		entry = s->selected_entry;
 	}