diff options
author | Nicholas Huelin <62965063+SirQuartz@users.noreply.github.com> | 2021-08-22 19:28:49 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-22 19:28:49 -0400 |
commit | c08407ed60e78ae60ff5e0de13ea0e524fa71276 (patch) | |
tree | a55f41ba7cef20d2e114f0d18e1a3eea9b79fb38 | |
parent | 7560ba8aa121420165d97fc0bdd4213dd56a2c50 (diff) |
Fix quick open script top result
This pull request fixes an issue where the top search result of the quick open script wouldn't be the most relevant when the first letter is typed.
-rw-r--r-- | editor/quick_open.cpp | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/editor/quick_open.cpp b/editor/quick_open.cpp index f8af3e8f36..3f2cd11c08 100644 --- a/editor/quick_open.cpp +++ b/editor/quick_open.cpp @@ -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()); } |