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
1 changed files with 10 additions and 4 deletions
|
@ -2141,9 +2141,12 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
|
|||
|
||||
if (completion_index > 0) {
|
||||
completion_index--;
|
||||
completion_current = completion_options[completion_index];
|
||||
update();
|
||||
} else {
|
||||
completion_index = completion_options.size() - 1;
|
||||
}
|
||||
completion_current = completion_options[completion_index];
|
||||
update();
|
||||
|
||||
accept_event();
|
||||
return;
|
||||
}
|
||||
|
@ -2152,9 +2155,12 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
|
|||
|
||||
if (completion_index < completion_options.size() - 1) {
|
||||
completion_index++;
|
||||
completion_current = completion_options[completion_index];
|
||||
update();
|
||||
} else {
|
||||
completion_index = 0;
|
||||
}
|
||||
completion_current = completion_options[completion_index];
|
||||
update();
|
||||
|
||||
accept_event();
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue