summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorkit <kitbdev@gmail.com>2024-05-02 09:16:32 -0400
committerkit <kitbdev@gmail.com>2024-05-02 09:26:08 -0400
commit0162683da4ac3f1505c114435d1f466cd606a5fc (patch)
treead52f0d3c8512923bb973570cf13f8e94e9bd031 /tests
parent06d105e268ace265809ae3fac2f17ccea9ff88dd (diff)
downloadredot-engine-0162683da4ac3f1505c114435d1f466cd606a5fc.tar.gz
Fix TextEdit crash with multiple carets disabled
Diffstat (limited to 'tests')
-rw-r--r--tests/scene/test_text_edit.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/scene/test_text_edit.h b/tests/scene/test_text_edit.h
index 246d869687..b2d9f5100e 100644
--- a/tests/scene/test_text_edit.h
+++ b/tests/scene/test_text_edit.h
@@ -7220,6 +7220,11 @@ TEST_CASE("[SceneTree][TextEdit] multicaret") {
CHECK(text_edit->get_caret_count() == 1);
CHECK(text_edit->get_caret_line(0) == 0);
CHECK(text_edit->get_caret_column(0) == 0);
+
+ // Does nothing if multiple carets are disabled.
+ text_edit->set_multiple_carets_enabled(false);
+ text_edit->add_caret_at_carets(true);
+ CHECK(text_edit->get_caret_count() == 1);
}
memdelete(text_edit);