diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-05-02 10:22:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-02 10:22:08 +0200 |
commit | fb917b55682f29deb0c3fdf4bcc86552b64bda34 (patch) | |
tree | e34e129e4998fae6a4dd838037c9bba177f74140 /modules/gdscript | |
parent | 02a51c34eabe74d0f8ce3b652ba84f2a81bd7516 (diff) | |
parent | 6e32157a65b208ba223c8e75c5e7a842d1684314 (diff) |
Merge pull request #18531 from KidRigger/issue5972
Adds keywords to autocomplete predictions.
Diffstat (limited to 'modules/gdscript')
-rw-r--r-- | modules/gdscript/gdscript_editor.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/gdscript/gdscript_editor.cpp b/modules/gdscript/gdscript_editor.cpp index a11ee709e6..db20b5450a 100644 --- a/modules/gdscript/gdscript_editor.cpp +++ b/modules/gdscript/gdscript_editor.cpp @@ -1522,6 +1522,13 @@ static void _find_identifiers(GDScriptCompletionContext &context, int p_line, bo result.insert(_type_names[i]); } + List<String> reserved_words; + GDScriptLanguage::get_singleton()->get_reserved_words(&reserved_words); + + for (List<String>::Element *E = reserved_words.front(); E; E = E->next()) { + result.insert(E->get()); + } + //autoload singletons List<PropertyInfo> props; ProjectSettings::get_singleton()->get_property_list(&props); |