summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Locurcio <hugo.locurcio@hugo.pro>2021-08-23 18:51:57 +0200
committerGitHub <noreply@github.com>2021-08-23 18:51:57 +0200
commit19a735913e3a50934933bd7b9d86371ba4821905 (patch)
tree8a5983eb3cf0dd2885f8a9a41f173e1ee86ed25b
parentc162c87535b394644e6e184ed9026e5d308296ab (diff)
parentc08407ed60e78ae60ff5e0de13ea0e524fa71276 (diff)
Merge pull request #51998 from SirQuartz/Schrödinger's-search-box
Fix quick open script results
-rw-r--r--editor/quick_open.cpp6
1 files changed, 0 insertions, 6 deletions
diff --git a/editor/quick_open.cpp b/editor/quick_open.cpp
index f835245328..fc3abbb87e 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());
}