diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-12-17 12:23:15 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-12-17 12:23:15 +0100 |
commit | 03cc4c3f3b1144cf59ffac6cdd561922abd2bd25 (patch) | |
tree | 9f73a348938049dac2511d90080c6ec2d4e2461a /tests | |
parent | 1e2297f13a5bae633e720585bb5b11f5b247641a (diff) | |
parent | 530b1f3f7a6e95abd8f731c8ce2a8c53f2d9a969 (diff) |
Merge pull request #70168 from Haydoggo/autocomplete-placement-fix
Fix autocomplete box placement
Diffstat (limited to 'tests')
-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); |