Merge pull request #11021 from tuga3d/autocomplete-logic-attempt2
autocomplete logic attempt 2, fixes #10695
This commit is contained in:
commit
cc161dcd6f
3 changed files with 10 additions and 2 deletions
|
@ -1023,9 +1023,11 @@ void CodeTextEditor::_line_col_changed() {
|
|||
|
||||
void CodeTextEditor::_text_changed() {
|
||||
|
||||
if (text_editor->is_insert_text_operation()) {
|
||||
code_complete_timer->start();
|
||||
idle->start();
|
||||
}
|
||||
}
|
||||
|
||||
void CodeTextEditor::_code_complete_timer_timeout() {
|
||||
if (!is_visible_in_tree())
|
||||
|
|
|
@ -4266,6 +4266,10 @@ bool TextEdit::is_insert_mode() const {
|
|||
return insert_mode;
|
||||
}
|
||||
|
||||
bool TextEdit::is_insert_text_operation() {
|
||||
return (current_op.type == TextOperation::TYPE_INSERT);
|
||||
}
|
||||
|
||||
uint32_t TextEdit::get_version() const {
|
||||
return current_op.version;
|
||||
}
|
||||
|
|
|
@ -386,6 +386,8 @@ public:
|
|||
void begin_complex_operation();
|
||||
void end_complex_operation();
|
||||
|
||||
bool is_insert_text_operation();
|
||||
|
||||
void set_text(String p_text);
|
||||
void insert_text_at_cursor(const String &p_text);
|
||||
void insert_at(const String &p_text, int at);
|
||||
|
|
Loading…
Reference in a new issue