mirror of https://github.com/MidnightCommander/mc
Search engine: if found_len parameter NULL, then mc_search_run don't try to fill them
This commit is contained in:
parent
824d12661b
commit
0d76e9aa34
|
@ -119,7 +119,8 @@ mc_search__run_normal (mc_search_t * mc_search, const void *user_data,
|
||||||
|
|
||||||
case COND__FOUND_CHAR_LAST:
|
case COND__FOUND_CHAR_LAST:
|
||||||
mc_search->normal_offset = current_pos;
|
mc_search->normal_offset = current_pos;
|
||||||
*found_len = search_pos + 1;
|
if (found_len)
|
||||||
|
*found_len = search_pos + 1;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -453,7 +453,8 @@ mc_search__run_regex (mc_search_t * mc_search, const void *user_data,
|
||||||
end_pos = mc_search->regex_match_info[0].rm_eo;
|
end_pos = mc_search->regex_match_info[0].rm_eo;
|
||||||
#endif /* HAVE_LIBPCRE */
|
#endif /* HAVE_LIBPCRE */
|
||||||
#endif /* GLIB_CHECK_VERSION (2, 14, 0) */
|
#endif /* GLIB_CHECK_VERSION (2, 14, 0) */
|
||||||
*found_len = end_pos - start_pos;
|
if (found_len)
|
||||||
|
*found_len = end_pos - start_pos;
|
||||||
mc_search->normal_offset = start_buffer + start_pos;
|
mc_search->normal_offset = start_buffer + start_pos;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue