Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/curve/editfont.c
| Show First 20 Lines • Show All 1,154 Lines • ▼ Show 20 Lines | case NEXT_WORD: { | ||||
| BLI_str_cursor_step_utf32( | BLI_str_cursor_step_utf32( | ||||
| ef->textbuf, ef->len, &pos, STRCUR_DIR_NEXT, STRCUR_JUMP_DELIM, true); | ef->textbuf, ef->len, &pos, STRCUR_DIR_NEXT, STRCUR_JUMP_DELIM, true); | ||||
| ef->pos = pos; | ef->pos = pos; | ||||
| cursmove = FO_CURS; | cursmove = FO_CURS; | ||||
| break; | break; | ||||
| } | } | ||||
| case PREV_CHAR: | case PREV_CHAR: | ||||
| ef->pos--; | BLI_str_cursor_step_prev_utf32(ef->textbuf, ef->len, &ef->pos); | ||||
| cursmove = FO_CURS; | cursmove = FO_CURS; | ||||
| break; | break; | ||||
| case NEXT_CHAR: | case NEXT_CHAR: | ||||
| ef->pos++; | BLI_str_cursor_step_next_utf32(ef->textbuf, ef->len, &ef->pos); | ||||
| cursmove = FO_CURS; | cursmove = FO_CURS; | ||||
| break; | break; | ||||
| case PREV_LINE: | case PREV_LINE: | ||||
| cursmove = FO_CURSUP; | cursmove = FO_CURSUP; | ||||
| break; | break; | ||||
| case NEXT_LINE: | case NEXT_LINE: | ||||
| cursmove = FO_CURSDOWN; | cursmove = FO_CURSDOWN; | ||||
| ▲ Show 20 Lines • Show All 322 Lines • ▼ Show 20 Lines | case DEL_SELECTION: | ||||
| return OPERATOR_CANCELLED; | return OPERATOR_CANCELLED; | ||||
| } | } | ||||
| break; | break; | ||||
| case DEL_PREV_CHAR: | case DEL_PREV_CHAR: | ||||
| if (ef->pos <= 0) { | if (ef->pos <= 0) { | ||||
| return OPERATOR_CANCELLED; | return OPERATOR_CANCELLED; | ||||
| } | } | ||||
| range[0] = ef->pos - 1; | |||||
| range[1] = ef->pos; | range[1] = ef->pos; | ||||
| BLI_str_cursor_step_prev_utf32(ef->textbuf, ef->len, &ef->pos); | |||||
| ef->pos--; | range[0] = ef->pos; | ||||
| break; | break; | ||||
| case DEL_NEXT_CHAR: | case DEL_NEXT_CHAR: | ||||
| if (ef->pos >= ef->len) { | if (ef->pos >= ef->len) { | ||||
| return OPERATOR_CANCELLED; | return OPERATOR_CANCELLED; | ||||
| } | } | ||||
| range[0] = ef->pos; | range[0] = ef->pos; | ||||
| range[1] = ef->pos + 1; | range[1] = ef->pos; | ||||
| BLI_str_cursor_step_next_utf32(ef->textbuf, ef->len, &range[1]); | |||||
| break; | break; | ||||
| case DEL_NEXT_WORD: { | case DEL_NEXT_WORD: { | ||||
| int pos = ef->pos; | int pos = ef->pos; | ||||
| BLI_str_cursor_step_utf32( | BLI_str_cursor_step_utf32( | ||||
| ef->textbuf, ef->len, &pos, STRCUR_DIR_NEXT, STRCUR_JUMP_DELIM, true); | ef->textbuf, ef->len, &pos, STRCUR_DIR_NEXT, STRCUR_JUMP_DELIM, true); | ||||
| range[0] = ef->pos; | range[0] = ef->pos; | ||||
| range[1] = pos; | range[1] = pos; | ||||
| break; | break; | ||||
| ▲ Show 20 Lines • Show All 736 Lines • Show Last 20 Lines | |||||