mirror of
https://github.com/lbonn/rofi
synced 2024-11-15 08:37:17 +00:00
Undo commit of sorting changes, did not want to apply this yet.
This commit is contained in:
parent
d549659f1e
commit
d27b8a21e9
1 changed files with 1 additions and 11 deletions
|
@ -727,17 +727,7 @@ static void menu_refilter ( MenuState *state, char **lines, menu_match_cb mmc, v
|
|||
if ( match ) {
|
||||
state->line_map[j] = i;
|
||||
if ( sorting ) {
|
||||
state->distance[i] = 0;
|
||||
char **words = tokenize ( lines[i], case_sensitive );
|
||||
for( int k = 0; tokens && tokens[k]; k++) {
|
||||
for ( int j = 0; words && words[j]; j++) {
|
||||
if (strcasecmp ( tokens[k], words[j] ) != 0)
|
||||
state->distance[i] += levenshtein ( tokens[k], words[j] ) * strlen(tokens[k]);
|
||||
else
|
||||
state->distance[i] -= strlen (tokens[k]) << 1;
|
||||
}
|
||||
}
|
||||
g_strfreev ( words );
|
||||
state->distance[i] = levenshtein ( state->text->text, lines[i] );
|
||||
}
|
||||
j++;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue