mirror of https://github.com/MidnightCommander/mc
Ticket #1543: Case-insensitive regex search with [^ranges] does not work correctly
Fixed Case-isentetive search with [ranges]. Reason of bug: content_pattern was initialized via str_create_search_needle() function (from src/strutils.c) This function convert string to lowercase if case_sentitive is off. Therefore string 'some_string[^a-zA-Z]' was transform into 'some_string[^a-za-z]' Fix issue: replace call of str_create_search_needle() function to g_strdup() Signed-off-by: Slava Zanko <slavazanko@gmail.com>
This commit is contained in:
parent
b819359535
commit
7dd9fdd505
|
@ -1153,7 +1153,7 @@ find_file (const char *start_dir, const char *pattern, const char *content,
|
|||
/* FIXME: Need to cleanup this, this ought to be passed non-globaly */
|
||||
find_pattern = str_unconst (pattern);
|
||||
content_pattern = (content != NULL && str_is_valid_string (content))
|
||||
? str_create_search_needle (content, content_case_sens_flag)
|
||||
? g_strdup(content)
|
||||
: NULL;
|
||||
|
||||
init_find_vars ();
|
||||
|
@ -1239,8 +1239,7 @@ find_file (const char *start_dir, const char *pattern, const char *content,
|
|||
}
|
||||
}
|
||||
|
||||
if (content_pattern != NULL)
|
||||
str_release_search_needle (content_pattern, content_case_sens_flag);
|
||||
g_free (content_pattern);
|
||||
kill_gui ();
|
||||
do_search (NULL); /* force do_search to release resources */
|
||||
g_free (old_dir);
|
||||
|
|
Loading…
Reference in New Issue