mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Merge pull request #68140 from quinnyo/auto-complete-option
Add editor setting to toggle automatic code completion
This commit is contained in:
commit
d13369eee1
4 changed files with 9 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue