瀏覽代碼

Make editor help select shortest (best) instead of first match

Bernhard Liebl 8 年之前
父節點
當前提交
d6a95e154a
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. 1 2
      editor/editor_help.cpp

+ 1 - 2
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;