Don't autocomplete numbers in GDScript
Cancel code autocompletion when a numerical value is entered. Avoids interference when setting numbers.
This commit is contained in:
parent
5f2137a050
commit
688d00b706
1 changed files with 6 additions and 0 deletions
|
@ -2926,6 +2926,12 @@ void CodeEdit::_filter_code_completion_candidates_impl() {
|
||||||
code_completion_options.clear();
|
code_completion_options.clear();
|
||||||
code_completion_base = string_to_complete;
|
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_casei;
|
||||||
Vector<ScriptLanguage::CodeCompletionOption> completion_options_substr;
|
Vector<ScriptLanguage::CodeCompletionOption> completion_options_substr;
|
||||||
Vector<ScriptLanguage::CodeCompletionOption> completion_options_substr_casei;
|
Vector<ScriptLanguage::CodeCompletionOption> completion_options_substr_casei;
|
||||||
|
|
Loading…
Reference in a new issue