Cancels the code complete timer when the caret moves to another line
Fixes and closes #68961
This commit is contained in:
parent
f3e6750a7e
commit
02f7e03a66
2 changed files with 6 additions and 0 deletions
|
@ -873,6 +873,10 @@ void CodeTextEditor::_reset_zoom() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void CodeTextEditor::_line_col_changed() {
|
void CodeTextEditor::_line_col_changed() {
|
||||||
|
if (!code_complete_timer->is_stopped() && code_complete_timer_line != text_editor->get_caret_line()) {
|
||||||
|
code_complete_timer->stop();
|
||||||
|
}
|
||||||
|
|
||||||
String line = text_editor->get_line(text_editor->get_caret_line());
|
String line = text_editor->get_line(text_editor->get_caret_line());
|
||||||
|
|
||||||
int positional_column = 0;
|
int positional_column = 0;
|
||||||
|
@ -902,6 +906,7 @@ void CodeTextEditor::_line_col_changed() {
|
||||||
|
|
||||||
void CodeTextEditor::_text_changed() {
|
void CodeTextEditor::_text_changed() {
|
||||||
if (text_editor->is_insert_text_operation()) {
|
if (text_editor->is_insert_text_operation()) {
|
||||||
|
code_complete_timer_line = text_editor->get_caret_line();
|
||||||
code_complete_timer->start();
|
code_complete_timer->start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -158,6 +158,7 @@ class CodeTextEditor : public VBoxContainer {
|
||||||
Label *info = nullptr;
|
Label *info = nullptr;
|
||||||
Timer *idle = nullptr;
|
Timer *idle = nullptr;
|
||||||
Timer *code_complete_timer = nullptr;
|
Timer *code_complete_timer = nullptr;
|
||||||
|
int code_complete_timer_line = 0;
|
||||||
|
|
||||||
Timer *font_resize_timer = nullptr;
|
Timer *font_resize_timer = nullptr;
|
||||||
int font_resize_val;
|
int font_resize_val;
|
||||||
|
|
Loading…
Reference in a new issue