1
1

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 <slavazanko@gmail.com>
Этот коммит содержится в:
Slava Zanko 2009-06-22 12:04:23 +03:00
родитель a5f4a672f6
Коммит b6b446076c
2 изменённых файлов: 1 добавлений и 3 удалений

Просмотреть файл

@ -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++;

Просмотреть файл

@ -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 ************************************************************************/