Changed fuzzy matching to favour matching case

This commit is contained in:
rxi 2020-05-23 14:30:24 +01:00
parent 28b1844a8b
commit 61092fbb99

View file

@ -363,11 +363,11 @@ static int f_fuzzy_match(lua_State *L) {
while (*str == ' ') { str++; }
while (*ptn == ' ') { ptn++; }
if (tolower(*str) == tolower(*ptn)) {
score += run;
score += run * 10 - (*str != *ptn);
run++;
ptn++;
} else {
score--;
score -= 10;
run = 0;
}
str++;