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

This commit is contained in:
Campbell Barton 2020-04-24 18:13:43 +10:00
parent e8d3996e67
commit 1625b7c37c
Notes: blender-bot 2023-09-13 08:48:34 +02:00
Referenced by issue #75749, UI button text selecting is broken by text offset
1 changed files with 1 additions and 1 deletions

View File

@ -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];
}