From b6b446076c483e1f54e12fb876da92b308f8ad3b Mon Sep 17 00:00:00 2001 From: Slava Zanko Date: Mon, 22 Jun 2009 12:04:23 +0300 Subject: [PATCH] Ticket #1366 (shell patterns: '[*' does not mark files started with '[') Description: Try to highlight files [1], [2] and [3]: Gray-+ [* (or \[*) Enter Nothing marked Fix solution: * With glob search backshash was escaped. Now this behaviour canceled. * Fix escaping of GLOB patterm search string. Signed-off-by: Slava Zanko --- src/search/glob.c | 2 -- src/strescape.c | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/search/glob.c b/src/search/glob.c index 213939323..c35b7121a 100644 --- a/src/search/glob.c +++ b/src/search/glob.c @@ -91,14 +91,12 @@ mc_search__glob_translate_to_regex (gchar * str, gsize * len) continue; } break; - case '\\': case '+': case '.': case '$': case '(': case ')': case '^': - case '-': g_string_append_c (buff, '\\'); g_string_append_c (buff, str[loop]); loop++; diff --git a/src/strescape.c b/src/strescape.c index ade680581..d19ed91d0 100644 --- a/src/strescape.c +++ b/src/strescape.c @@ -39,7 +39,7 @@ static const char ESCAPE_SHELL_CHARS[] = " !#$%()&~{}[]`?|<>;*\\\""; static const char ESCAPE_REGEX_CHARS[] = "^!#$%()&~{}[]`?|<>;*.\\"; -static const char ESCAPE_GLOB_CHARS[] = "${}*.\\"; +static const char ESCAPE_GLOB_CHARS[] = "$*\\"; /*** file scope functions ************************************************************************/