Skip to content

Commit

Permalink
Merge pull request #62731 from akien-mga/Janglee123-autocompletion-un…
Browse files Browse the repository at this point in the history
…derscore
  • Loading branch information
akien-mga authored Jul 5, 2022
2 parents 917f215 + 00c6cdd commit 32ef964
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions modules/gdscript/gdscript_editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1838,6 +1838,9 @@ static void _find_enumeration_candidates(const String p_enum_hint, Map<String, S
ClassDB::get_enum_constants(class_name, enum_name, &enum_constants);
for (List<StringName>::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);
}
Expand Down

0 comments on commit 32ef964

Please sign in to comment.