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

If no filter specified, match everything with default matcher

This commit is contained in:
Dave Davenport 2017-01-30 08:23:33 +01:00
parent 6a01c9c9f8
commit 0a31175da5

View file

@ -442,10 +442,12 @@ PangoAttrList *token_match_get_pango_attr ( ThemeHighlight th, GRegex **tokens,
int token_match ( GRegex * const *tokens, const char *input )
{
int match = ( tokens != NULL );
int match = TRUE;
// Do a tokenized match.
for ( int j = 0; match && tokens[j]; j++ ) {
match = g_regex_match ( (const GRegex *) tokens[j], input, 0, NULL );
if ( tokens ) {
for ( int j = 0; match && tokens[j]; j++ ) {
match = g_regex_match ( (const GRegex *) tokens[j], input, 0, NULL );
}
}
return match;
}