auto-completion edge jump
arrow up/down jumps to end/start on edges
(cherry picked from commit e36dd4282b
)
This commit is contained in:
parent
b5a55810c5
commit
259b9664ef
|
@ -2141,9 +2141,12 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
|
||||||
|
|
||||||
if (completion_index > 0) {
|
if (completion_index > 0) {
|
||||||
completion_index--;
|
completion_index--;
|
||||||
completion_current = completion_options[completion_index];
|
} else {
|
||||||
update();
|
completion_index = completion_options.size() - 1;
|
||||||
}
|
}
|
||||||
|
completion_current = completion_options[completion_index];
|
||||||
|
update();
|
||||||
|
|
||||||
accept_event();
|
accept_event();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2152,9 +2155,12 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
|
||||||
|
|
||||||
if (completion_index < completion_options.size() - 1) {
|
if (completion_index < completion_options.size() - 1) {
|
||||||
completion_index++;
|
completion_index++;
|
||||||
completion_current = completion_options[completion_index];
|
} else {
|
||||||
update();
|
completion_index = 0;
|
||||||
}
|
}
|
||||||
|
completion_current = completion_options[completion_index];
|
||||||
|
update();
|
||||||
|
|
||||||
accept_event();
|
accept_event();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue