Fix the "END" key behaving like "PAGE_DOWN" in code completion.

Before: behaved like page down.
After: goes to last item.
This commit is contained in:
Eric M 2021-10-06 01:28:29 +10:00 committed by GitHub
parent 198b49d8b5
commit ced7d51e23
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -433,7 +433,7 @@ void CodeEdit::gui_input(const Ref<InputEvent> &p_gui_input) {
return;
}
if (k->is_action("ui_end", true)) {
code_completion_current_selected = MIN(code_completion_options.size() - 1, code_completion_current_selected + code_completion_max_lines);
code_completion_current_selected = code_completion_options.size() - 1;
update();
accept_event();
return;