summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2017-11-29 08:58:56 +0100
committerGitHub <noreply@github.com>2017-11-29 08:58:56 +0100
commit6110235bd4fd95bc35b0beaa6023e5787d786242 (patch)
treeda71c329cb32471c6c54735a99d854dbb90fe99b
parent76725b6c1f73c8d160ad91b42c803a54c78298d4 (diff)
parentd6a95e154a507494efc51767d4535d8c36792d33 (diff)
Merge pull request #13390 from poke1024/opteditorhelp
Make editor help select shortest (best) instead of first match
-rw-r--r--editor/editor_help.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp
index 4b372e7afd..5fc27c2e3c 100644
--- a/editor/editor_help.cpp
+++ b/editor/editor_help.cpp
@@ -433,12 +433,11 @@ void EditorHelpIndex::_update_class_list() {
while (type != "") {
if (filter.is_subsequence_ofi(type)) {
- if (to_select.empty()) {
+ if (to_select.empty() || type.length() < to_select.length()) {
to_select = type;
}
found = true;
- break;
}
type = EditorHelp::get_doc_data()->class_list[type].inherits;