Merge pull request #97122 from adamscott/fix-trackpad-code-completion-scrolling

Fix trackpad code completion scrolling
This commit is contained in:
Thaddeus Crews 2024-10-14 14:09:44 -05:00
commit c220e5bffd
No known key found for this signature in database
GPG key ID: 62181B86FE9E5D84

View file

@ -277,15 +277,17 @@ void CodeEdit::gui_input(const Ref<InputEvent> &p_gui_input) {
code_completion_force_item_center = -1;
queue_redraw();
}
code_completion_pan_offset += 1.0f;
code_completion_pan_offset = 0;
} else if (code_completion_pan_offset >= +1.0) {
if (code_completion_current_selected < code_completion_options.size() - 1) {
code_completion_current_selected++;
code_completion_force_item_center = -1;
queue_redraw();
}
code_completion_pan_offset -= 1.0f;
code_completion_pan_offset = 0;
}
accept_event();
return;
}
Ref<InputEventMouseButton> mb = p_gui_input;