diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-04-05 23:49:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-05 23:49:41 +0200 |
commit | a8ae206a1efd7dcdad2d39aea56d4531a5bb481e (patch) | |
tree | e2b992593c1adc6ca2c7aaf1420dd5a9dcbaa63d /editor | |
parent | 956189e0d2066dc6ac7a2cadc18d9cf7d6a912f1 (diff) | |
parent | 208c4ce3f06d61d9e6b361d21e23342085a2bff4 (diff) |
Merge pull request #59922 from V-Sekai/fix_editor_search
Improve handling for editor documentation search with blank searches
Diffstat (limited to 'editor')
-rw-r--r-- | editor/editor_help_search.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/editor/editor_help_search.cpp b/editor/editor_help_search.cpp index 8e03c55712..c747ae326f 100644 --- a/editor/editor_help_search.cpp +++ b/editor/editor_help_search.cpp @@ -331,7 +331,10 @@ bool EditorHelpSearch::Runner::_phase_match_classes() { // Match class name. if (search_flags & SEARCH_CLASSES) { - match.name = term.is_empty() || _match_string(term, class_doc.name); + // If the search term is empty, add any classes which are not script docs or which don't start with + // a double-quotation. This will ensure that only C++ classes and explictly named classes will + // be added. + match.name = (term.is_empty() && (!class_doc.is_script_doc || class_doc.name[0] != '\"')) || _match_string(term, class_doc.name); } // Match members if the term is long enough. @@ -398,6 +401,7 @@ bool EditorHelpSearch::Runner::_phase_match_classes() { } } } + matches[class_doc.name] = match; } iterator_doc = iterator_doc->next(); |