Commit f2d4ba2a35c7888ee5c400f7353f73dd594d315f

Stefan Sperling 2019-06-21T12:22:18

better regcomp flags for tog log search

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/tog/tog.c b/tog/tog.c
index 6e379c9..326e696 100644
--- a/tog/tog.c
+++ b/tog/tog.c
@@ -1698,7 +1698,8 @@ search_start_log_view(struct tog_view *view)
 	}
 
 	s->matched_entry = NULL;
-	if (regcomp(&s->regex, pattern, REG_EXTENDED | REG_ICASE) == 0) {
+	if (regcomp(&s->regex, pattern,
+	    REG_EXTENDED | REG_ICASE | REG_NOSUB | REG_NEWLINE) == 0) {
 		view->searching = TOG_SEARCH_FORWARD;
 		view->search_next_done = 0;
 		view->search_next(view);