Skip to content

Commit d27b8a2

Browse files
committed
Undo commit of sorting changes, did not want to apply this yet.
1 parent d549659 commit d27b8a2

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

source/rofi.c

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -727,17 +727,7 @@ static void menu_refilter ( MenuState *state, char **lines, menu_match_cb mmc, v
727727
if ( match ) {
728728
state->line_map[j] = i;
729729
if ( sorting ) {
730-
state->distance[i] = 0;
731-
char **words = tokenize ( lines[i], case_sensitive );
732-
for( int k = 0; tokens && tokens[k]; k++) {
733-
for ( int j = 0; words && words[j]; j++) {
734-
if (strcasecmp ( tokens[k], words[j] ) != 0)
735-
state->distance[i] += levenshtein ( tokens[k], words[j] ) * strlen(tokens[k]);
736-
else
737-
state->distance[i] -= strlen (tokens[k]) << 1;
738-
}
739-
}
740-
g_strfreev ( words );
730+
state->distance[i] = levenshtein ( state->text->text, lines[i] );
741731
}
742732
j++;
743733
}

0 commit comments

Comments
 (0)