diff --git a/modules/cscript/cscript_editor.cpp b/modules/cscript/cscript_editor.cpp index e0d7d3ba6..5353be8b0 100644 --- a/modules/cscript/cscript_editor.cpp +++ b/modules/cscript/cscript_editor.cpp @@ -1829,6 +1829,9 @@ static void _find_enumeration_candidates(const String p_enum_hint, Map::Element *E = enum_constants.front(); E; E = E->next()) { String candidate = class_name + "." + E->get(); + if (candidate[0] == '_') { // Trim leading underscore. + candidate = candidate.substr(1); + } ScriptCodeCompletionOption option(candidate, ScriptCodeCompletionOption::KIND_ENUM); r_result.insert(option.display, option); }