diff options
author | Dave Davenport <qball@gmpclient.org> | 2015-07-10 21:33:26 +0200 |
---|---|---|
committer | Dave Davenport <qball@gmpclient.org> | 2015-07-10 21:33:26 +0200 |
commit | d27b8a21e98455cf1277fa92b979151e39314383 (patch) | |
tree | 96c873b61e63f0a5bfc50d120e36dadabffdedfc | |
parent | d549659f1e33952a6d2ef45593b4cd31978fa664 (diff) |
Undo commit of sorting changes, did not want to apply this yet.
-rw-r--r-- | source/rofi.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/source/rofi.c b/source/rofi.c index f524d00c..9c4df719 100644 --- a/source/rofi.c +++ b/source/rofi.c @@ -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++; } |