mirror of
https://github.com/davatorium/rofi.git
synced 2025-02-03 15:34:54 -05:00
Fuzzy matcher, take simple escaping into account when creating regex.
This commit is contained in:
parent
4f3c7f122e
commit
84f7ec2f0e
1 changed files with 5 additions and 0 deletions
|
@ -181,6 +181,11 @@ static gchar *fuzzy_to_regex ( const char * input )
|
||||||
else {
|
else {
|
||||||
g_string_append ( str, ".*(" );
|
g_string_append ( str, ".*(" );
|
||||||
}
|
}
|
||||||
|
if ( *iter == '\\' ){
|
||||||
|
g_string_append_c ( str, '\\');
|
||||||
|
iter = g_utf8_next_char ( iter );
|
||||||
|
if ( iter == NULL ) break;
|
||||||
|
}
|
||||||
g_string_append_unichar ( str, g_utf8_get_char ( iter ) );
|
g_string_append_unichar ( str, g_utf8_get_char ( iter ) );
|
||||||
g_string_append ( str, ")" );
|
g_string_append ( str, ")" );
|
||||||
first = 0;
|
first = 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue