summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Liebl <Bernhard.Liebl@gmx.org>2017-11-29 07:20:11 +0100
committerBernhard Liebl <Bernhard.Liebl@gmx.org>2017-11-29 07:20:11 +0100
commitd6a95e154a507494efc51767d4535d8c36792d33 (patch)
tree105743c6ddc9f006e1e92274ec370cc98d23aeaa
parentedde7190abc65dcf2886cebc6f2486fd807e0e65 (diff)
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;