Merge pull request #51998 from SirQuartz/Schrödinger's-search-box

Fix quick open script results
This commit is contained in:
Hugo Locurcio 2021-08-23 18:51:57 +02:00 committed by GitHub
commit 19a735913e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 6 deletions

View File

@ -130,12 +130,6 @@ float EditorQuickOpen::_score_path(const String &p_search, const String &p_path)
return score * (1.0f - 0.1f * (float(pos) / file.length()));
}
// Positive bias for matches close to the end of the path.
pos = p_path.rfindn(p_search);
if (pos != -1) {
return 1.1f + 0.09 / (p_path.length() - pos + 1);
}
// Similarity
return p_path.to_lower().similarity(p_search.to_lower());
}