elements
elements copied to clipboard
input_box bug
The input_box is There is a subscript out of bounds problem in https://github.com/cycfi/elements/blob/ae7b87a8cc53258fac7d1d5a7b96da2994116dcf/lib/src/element/text.cpp#L885 When entering the first words, the _select_end is 1, get_text() value size is 1,out of range.
Here are my changes:
basic_text_box::caret_metrics info;
if (_select_end >= get_text().size()) {
caret_info(ctx, U"");
} else {
caret_info(ctx, &get_text()[_select_end]);
}
Please file a PR. Thanks!
ok,i will do it
This is fixed and merged to head
and develop
branches.