fix: manually changing textbox.caret does not reset selection

This commit is contained in:
MihailRis 2026-04-29 23:30:19 +03:00
parent 7fb51526fd
commit 843cc3769d
2 changed files with 2 additions and 1 deletions

View file

@ -759,6 +759,7 @@ static void p_set_text(UINode* node, lua::State* L, int idx) {
static void p_set_caret(UINode* node, lua::State* L, int idx) {
if (auto box = dynamic_cast<TextBox*>(node)) {
box->setCaret(static_cast<ptrdiff_t>(lua::tointeger(L, idx)));
box->resetSelection();
}
}
static void p_set_editable(UINode* node, lua::State* L, int idx) {