-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsearchnewline.diff
31 lines (24 loc) · 1.16 KB
/
searchnewline.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
diff --git a/lib/search/regex.c b/lib/search/regex.c
index 32be35319..5443ec39b 100644
--- a/lib/search/regex.c
+++ b/lib/search/regex.c
@@ -902,7 +902,7 @@ mc_search__run_regex (mc_search_t * lc_mc_search, const void *user_data,
{
while (TRUE)
{
- int current_chr = '\n'; /* stop search symbol */
+ int current_chr = '\0'; /* stop search symbol */
ret = lc_mc_search->search_fn (user_data, current_pos, ¤t_chr);
@@ -921,7 +921,7 @@ mc_search__run_regex (mc_search_t * lc_mc_search, const void *user_data,
g_string_append_c (lc_mc_search->regex_buffer, (char) current_chr);
- if ((char) current_chr == '\n' || virtual_pos > end_search)
+ if ((char) current_chr == '\0' || virtual_pos >= end_search)
break;
}
}
@@ -940,7 +940,7 @@ mc_search__run_regex (mc_search_t * lc_mc_search, const void *user_data,
current_pos++;
- if (current_chr == '\n' || current_pos > end_search)
+ if (current_pos >= end_search)
break;
}