diff --git a/modules/gdscript/gdscript_editor.cpp b/modules/gdscript/gdscript_editor.cpp index b9a544600de..d1b49076abd 100644 --- a/modules/gdscript/gdscript_editor.cpp +++ b/modules/gdscript/gdscript_editor.cpp @@ -1838,6 +1838,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); }