Commit Diff


commit - 5330ab762909f51f51f564f8b8af9eac9c8f4354
commit + f54d892e4b41b214bfbc655c9d9b72d8b2bf0f07
blob - 344c266805e9013512993feb7f77e07dc537338f
blob + 150f3c355688b24c83a7a03a635b993f8f20f5a2
--- tog/tog.c
+++ tog/tog.c
@@ -1293,7 +1293,7 @@ tog_resizeterm(void)
 }
 
 static const struct got_error *
-view_search_start(struct tog_view *view)
+view_search_start(struct tog_view *view, int fast_refresh)
 {
 	const struct got_error *err = NULL;
 	struct tog_view *v = view;
@@ -1326,6 +1326,8 @@ view_search_start(struct tog_view *view)
 	cbreak();
 	noecho();
 	nodelay(v->window, TRUE);
+	if (!fast_refresh)
+		halfdelay(10);
 	if (ret == ERR)
 		return NULL;
 
@@ -1493,7 +1495,7 @@ action_report(struct tog_view *view)
 
 static const struct got_error *
 view_input(struct tog_view **new, int *done, struct tog_view *view,
-    struct tog_view_list_head *views)
+    struct tog_view_list_head *views, int fast_refresh)
 {
 	const struct got_error *err = NULL;
 	struct tog_view *v;
@@ -1688,7 +1690,7 @@ view_input(struct tog_view **new, int *done, struct to
 	case '/':
 		view->count = 0;
 		if (view->search_start)
-			view_search_start(view);
+			view_search_start(view, fast_refresh);
 		else
 			err = view->input(new, view, ch);
 		break;
@@ -1780,7 +1782,7 @@ view_loop(struct tog_view *view)
 		if (fast_refresh && --fast_refresh == 0)
 			halfdelay(10); /* switch to once per second */
 
-		err = view_input(&new_view, &done, view, &views);
+		err = view_input(&new_view, &done, view, &views, fast_refresh);
 		if (err)
 			break;