Skip to content

Commit

Permalink
Merge pull request #45393 from Paulb23/code_edit_autocomplete
Browse files Browse the repository at this point in the history
  • Loading branch information
akien-mga authored Jun 1, 2021
2 parents 0aabfb3 + 1684276 commit c5f237e
Show file tree
Hide file tree
Showing 15 changed files with 2,059 additions and 888 deletions.
6 changes: 5 additions & 1 deletion core/input/input_map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
2 changes: 2 additions & 0 deletions core/object/script_language.h
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,8 @@ class ScriptInstance {
};

struct ScriptCodeCompletionOption {
/* Keep enum in Sync with: */
/* /scene/gui/code_edit.h - CodeEdit::CodeCompletionKind */
enum Kind {
KIND_CLASS,
KIND_FUNCTION,
Expand Down
Loading

0 comments on commit c5f237e

Please sign in to comment.