Fix T75749: UI button text selecting is broken by text offset

tmp-T80603
Campbell Barton 3 years ago
parent e8d3996e67
commit 1625b7c37c

@ -2942,7 +2942,7 @@ static void ui_textedit_set_cursor_pos(uiBut *but, uiHandleButtonData *data, con
if (but->pos <= 0) {
break;
}
if (BLI_str_cursor_step_prev_utf8(str, but->ofs, &pos_i)) {
if (BLI_str_cursor_step_prev_utf8(str + but->ofs, but->ofs, &pos_i)) {
but->pos = pos_i;
str_last = &str[but->pos + but->ofs];
}

Loading…
Cancel
Save