fzy

terminal fuzzy finder picker

git clone https://9o.is/git/fzy.git

commit bce0e2e17fba96f660d13928539da3c74d8a2e54
parent dbf0874b323935c304ff838b2e900607d044a795
Author: John Hawthorn <john.hawthorn@gmail.com>
Date:   Wed,  8 Jun 2016 17:37:38 -0700

Remove calculate_score (same as match_positions)

Diffstat:
Msrc/match.c | 6+-----
1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/src/match.c b/src/match.c @@ -55,7 +55,7 @@ void mat_print(score_t *mat, char name, const char *needle, const char *haystack } #endif -score_t calculate_score(const char *needle, const char *haystack, size_t *positions) { +score_t match_positions(const char *needle, const char *haystack, size_t *positions) { if (!*needle) return SCORE_MIN; @@ -174,10 +174,6 @@ score_t calculate_score(const char *needle, const char *haystack, size_t *positi return M[n - 1][m - 1]; } -score_t match_positions(const char *needle, const char *haystack, size_t *positions) { - return calculate_score(needle, haystack, positions); -} - score_t match(const char *needle, const char *haystack) { return match_positions(needle, haystack, NULL); }