diff options
author | Hayden Leete <haydenleete@gmail.com> | 2022-12-17 10:17:55 +1300 |
---|---|---|
committer | Hayden Leete <haydenleete@gmail.com> | 2022-12-17 12:33:29 +1300 |
commit | 530b1f3f7a6e95abd8f731c8ce2a8c53f2d9a969 (patch) | |
tree | 7ed04e9e8cc548e2a7943f1bd24040f3f4cb5206 /tests/scene | |
parent | 15631e24f740872c2be7cf81dd252c38b4aa174e (diff) |
Fix autocomplete box placement
Diffstat (limited to 'tests/scene')
-rw-r--r-- | tests/scene/test_code_edit.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/scene/test_code_edit.h b/tests/scene/test_code_edit.h index 3940bdb37a..326b55d07a 100644 --- a/tests/scene/test_code_edit.h +++ b/tests/scene/test_code_edit.h @@ -3027,7 +3027,7 @@ TEST_CASE("[SceneTree][CodeEdit] completion") { CHECK(code_edit->get_code_completion_selected_index() == 0); Point2 caret_pos = code_edit->get_caret_draw_pos(); - caret_pos.y -= code_edit->get_line_height(); + caret_pos.y += code_edit->get_line_height(); SEND_GUI_MOUSE_BUTTON_EVENT(code_edit, caret_pos, MouseButton::WHEEL_DOWN, MouseButton::NONE, Key::NONE); CHECK(code_edit->get_code_completion_selected_index() == 1); @@ -3035,6 +3035,7 @@ TEST_CASE("[SceneTree][CodeEdit] completion") { CHECK(code_edit->get_code_completion_selected_index() == 0); /* Single click selects. */ + caret_pos.y += code_edit->get_line_height() * 2; SEND_GUI_MOUSE_BUTTON_EVENT(code_edit, caret_pos, MouseButton::LEFT, MouseButton::MASK_LEFT, Key::NONE); CHECK(code_edit->get_code_completion_selected_index() == 2); |