diff --git a/modules/gdscript/gdscript_editor.cpp b/modules/gdscript/gdscript_editor.cpp index 4ffca497819..a3b0bbe18e0 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); }