From d6a95e154a507494efc51767d4535d8c36792d33 Mon Sep 17 00:00:00 2001 From: Bernhard Liebl Date: Wed, 29 Nov 2017 07:20:11 +0100 Subject: [PATCH] Make editor help select shortest (best) instead of first match --- editor/editor_help.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp index 4b372e7afd4..5fc27c2e3cf 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;