diff --git a/modules/gdscript/gdscript_editor.cpp b/modules/gdscript/gdscript_editor.cpp index 951ae6ce998c..f2efb65e98fe 100644 --- a/modules/gdscript/gdscript_editor.cpp +++ b/modules/gdscript/gdscript_editor.cpp @@ -1196,6 +1196,7 @@ static void _find_identifiers_in_base(const GDScriptCompletionIdentifier &p_base for (const MethodInfo &E : signals) { int location = p_recursion_depth + _get_signal_location(scr, E.name); ScriptLanguage::CodeCompletionOption option(E.name, ScriptLanguage::CODE_COMPLETION_KIND_SIGNAL, location); + option.display += E.arguments.is_empty() ? "()" : "(...)"; r_result.insert(option.display, option); } } @@ -1219,8 +1220,10 @@ static void _find_identifiers_in_base(const GDScriptCompletionIdentifier &p_base ScriptLanguage::CodeCompletionOption option(E.name, ScriptLanguage::CODE_COMPLETION_KIND_FUNCTION, location); if (E.arguments.size()) { option.insert_text += "("; + option.display += "()"; } else { option.insert_text += "()"; + option.display += "(...)"; } r_result.insert(option.display, option); } @@ -1285,6 +1288,7 @@ static void _find_identifiers_in_base(const GDScriptCompletionIdentifier &p_base for (const MethodInfo &E : signals) { int location = p_recursion_depth + _get_signal_location(type, StringName(E.name)); ScriptLanguage::CodeCompletionOption option(E.name, ScriptLanguage::CODE_COMPLETION_KIND_SIGNAL, location); + option.display += E.arguments.is_empty() ? "()" : "(...)"; r_result.insert(option.display, option); } } @@ -1305,8 +1309,10 @@ static void _find_identifiers_in_base(const GDScriptCompletionIdentifier &p_base ScriptLanguage::CodeCompletionOption option(E.name, ScriptLanguage::CODE_COMPLETION_KIND_FUNCTION, location); if (E.arguments.size()) { option.insert_text += "("; + option.display += "()"; } else { option.insert_text += "()"; + option.display += "(...)"; } r_result.insert(option.display, option); } @@ -1376,8 +1382,10 @@ static void _find_identifiers_in_base(const GDScriptCompletionIdentifier &p_base ScriptLanguage::CodeCompletionOption option(E.name, ScriptLanguage::CODE_COMPLETION_KIND_FUNCTION, location); if (E.arguments.size()) { option.insert_text += "("; + option.display += "()"; } else { option.insert_text += "()"; + option.display += "(...)"; } r_result.insert(option.display, option); }