1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2024-11-11 13:50:48 -05:00

Fuzzy matcher, take simple escaping into account when creating regex.

This commit is contained in:
Dave Davenport 2016-11-26 17:18:38 +01:00
parent 4f3c7f122e
commit 84f7ec2f0e

View file

@ -181,6 +181,11 @@ static gchar *fuzzy_to_regex ( const char * input )
else {
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 ( str, ")" );
first = 0;