Merge pull request #74466 from puchik/no-number-autocomplete

Don't autocomplete numbers in GDScript
This commit is contained in:
Rémi Verschelde 2023-03-07 08:38:57 +01:00
commit c74e149811
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -2926,6 +2926,12 @@ void CodeEdit::_filter_code_completion_candidates_impl() {
code_completion_options.clear();
code_completion_base = string_to_complete;
/* Don't autocomplete setting numerical values. */
if (code_completion_base.is_numeric()) {
cancel_code_completion();
return;
}
Vector<ScriptLanguage::CodeCompletionOption> completion_options_casei;
Vector<ScriptLanguage::CodeCompletionOption> completion_options_substr;
Vector<ScriptLanguage::CodeCompletionOption> completion_options_substr_casei;