summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-06-01 17:58:19 +0200
committerGitHub <noreply@github.com>2021-06-01 17:58:19 +0200
commitc5f237eaf8e46e55699a3e95956daec65f5aa963 (patch)
treee67be6f66a353c96f4c7528c0ca7fe30d3266b1e /core
parent0aabfb341a477280befe115926486f2a32f34f0e (diff)
parent168427624ebcac64e34282eddc7856fa5de45ce6 (diff)
Merge pull request #45393 from Paulb23/code_edit_autocomplete
Diffstat (limited to 'core')
-rw-r--r--core/input/input_map.cpp6
-rw-r--r--core/object/script_language.h2
2 files changed, 7 insertions, 1 deletions
diff --git a/core/input/input_map.cpp b/core/input/input_map.cpp
index a43ad4ed7d..878ce820fb 100644
--- a/core/input/input_map.cpp
+++ b/core/input/input_map.cpp
@@ -474,10 +474,14 @@ const OrderedHashMap<String, List<Ref<InputEvent>>> &InputMap::get_builtins() {
default_builtin_cache.insert("ui_text_completion_query", inputs);
inputs = List<Ref<InputEvent>>();
- inputs.push_back(InputEventKey::create_reference(KEY_TAB));
inputs.push_back(InputEventKey::create_reference(KEY_ENTER));
+ inputs.push_back(InputEventKey::create_reference(KEY_KP_ENTER));
default_builtin_cache.insert("ui_text_completion_accept", inputs);
+ inputs = List<Ref<InputEvent>>();
+ inputs.push_back(InputEventKey::create_reference(KEY_TAB));
+ default_builtin_cache.insert("ui_text_completion_replace", inputs);
+
// Newlines
inputs = List<Ref<InputEvent>>();
inputs.push_back(InputEventKey::create_reference(KEY_ENTER));
diff --git a/core/object/script_language.h b/core/object/script_language.h
index bb46c718b2..9ed3c7e80f 100644
--- a/core/object/script_language.h
+++ b/core/object/script_language.h
@@ -242,6 +242,8 @@ public:
};
struct ScriptCodeCompletionOption {
+ /* Keep enum in Sync with: */
+ /* /scene/gui/code_edit.h - CodeEdit::CodeCompletionKind */
enum Kind {
KIND_CLASS,
KIND_FUNCTION,