diff options
| author | Yuri Sizov <yuris@humnom.net> | 2023-07-12 17:15:51 +0200 |
|---|---|---|
| committer | Yuri Sizov <yuris@humnom.net> | 2023-07-12 17:15:51 +0200 |
| commit | d13369eee12fc264ef9df0ae86d6a19165e58449 (patch) | |
| tree | d541cc09e4d340d78ee39300a1321915dba52309 /editor/code_editor.cpp | |
| parent | 223370cb6413285f5da7c1ac5f767c2a2914fe0c (diff) | |
| parent | 68c24f99938ed850e34ec56abc44ab7f2aa0b47e (diff) | |
| download | redot-engine-d13369eee12fc264ef9df0ae86d6a19165e58449.tar.gz | |
Merge pull request #68140 from quinnyo/auto-complete-option
Add editor setting to toggle automatic code completion
Diffstat (limited to 'editor/code_editor.cpp')
| -rw-r--r-- | editor/code_editor.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp index 78b01b6c78..cde74e0854 100644 --- a/editor/code_editor.cpp +++ b/editor/code_editor.cpp @@ -905,7 +905,7 @@ void CodeTextEditor::_line_col_changed() { } void CodeTextEditor::_text_changed() { - if (text_editor->is_insert_text_operation()) { + if (code_complete_enabled && text_editor->is_insert_text_operation()) { code_complete_timer_line = text_editor->get_caret_line(); code_complete_timer->start(); } @@ -1737,6 +1737,7 @@ void CodeTextEditor::_apply_settings_change() { text_editor->set_code_hint_draw_below(EDITOR_GET("text_editor/completion/put_callhint_tooltip_below_current_line")); + code_complete_enabled = EDITOR_GET("text_editor/completion/code_complete_enabled"); code_complete_timer->set_wait_time(EDITOR_GET("text_editor/completion/code_complete_delay")); idle->set_wait_time(EDITOR_GET("text_editor/completion/idle_parse_delay")); } @@ -2011,6 +2012,7 @@ CodeTextEditor::CodeTextEditor() { idle->set_one_shot(true); idle->set_wait_time(EDITOR_GET("text_editor/completion/idle_parse_delay")); + code_complete_enabled = EDITOR_GET("text_editor/completion/code_complete_enabled"); code_complete_timer = memnew(Timer); add_child(code_complete_timer); code_complete_timer->set_one_shot(true); |
