mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-23 04:46:55 +03:00
Fixed Select/Unselect file mask. now mask applied to entire filename, not to part of filename
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
This commit is contained in:
parent
b2a680b768
commit
dbb953bfbe
@ -528,9 +528,9 @@ select_unselect_cmd (const char *title, const char *history_name, gboolean do_se
|
||||
g_free (reg_exp);
|
||||
return;
|
||||
}
|
||||
|
||||
search = mc_search_new (reg_exp, -1);
|
||||
search->search_type = MC_SEARCH_T_GLOB;
|
||||
search->is_entire_line = TRUE;
|
||||
search->is_case_sentitive = case_sens != 0;
|
||||
|
||||
for (i = 0; i < current_panel->count; i++) {
|
||||
|
@ -115,9 +115,15 @@ void
|
||||
mc_search__cond_struct_new_init_glob (const char *charset, mc_search_t * mc_search,
|
||||
mc_search_cond_t * mc_search_cond)
|
||||
{
|
||||
GString *tmp = mc_search__glob_translate_to_regex (mc_search_cond->str->str, &mc_search_cond->len);
|
||||
GString *tmp =
|
||||
mc_search__glob_translate_to_regex (mc_search_cond->str->str, &mc_search_cond->len);
|
||||
|
||||
g_string_free (mc_search_cond->str, TRUE);
|
||||
|
||||
if (mc_search->is_entire_line) {
|
||||
g_string_prepend_c (tmp, '^');
|
||||
g_string_append_c (tmp, '$');
|
||||
}
|
||||
mc_search_cond->str = tmp;
|
||||
|
||||
mc_search__cond_struct_new_init_regex (charset, mc_search, mc_search_cond);
|
||||
|
@ -68,6 +68,9 @@ typedef struct mc_search_struct {
|
||||
/* search only once. Is this for replace? */
|
||||
gboolean is_once_only;
|
||||
|
||||
/* search entire string (from begin to end). Used only with GLOB search type */
|
||||
gboolean is_entire_line;
|
||||
|
||||
/* function, used for getting data. NULL if not used */
|
||||
mc_search_fn search_fn;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user