Skip to content

Commit

Permalink
added round brakcets for methods and signals autocompletion; fixed CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Lazy-Rabbit-2001 committed Nov 12, 2024
1 parent ec6a1c0 commit 17d69b0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions modules/gdscript/gdscript_editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand All @@ -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);
}
Expand Down Expand Up @@ -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);
}
}
Expand All @@ -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);
}
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit 17d69b0

Please sign in to comment.