| 3713 | } |
| 3714 | |
| 3715 | static int is_word_boundary_from_right(ImGuiInputTextState* obj, int idx) |
| 3716 | { |
| 3717 | // When ImGuiInputTextFlags_Password is set, we don't want actions such as CTRL+Arrow to leak the fact that underlying data are blanks or separators. |
| 3718 | if ((obj->Flags & ImGuiInputTextFlags_Password) || idx <= 0) |
| 3719 | return 0; |
| 3720 | |
| 3721 | bool prev_white = ImCharIsBlankW(obj->TextW[idx - 1]); |
| 3722 | bool prev_separ = is_separator(obj->TextW[idx - 1]); |
| 3723 | bool curr_white = ImCharIsBlankW(obj->TextW[idx]); |
| 3724 | bool curr_separ = is_separator(obj->TextW[idx]); |
| 3725 | return ((prev_white || prev_separ) && !(curr_separ || curr_white)) || (curr_separ && !prev_separ); |
| 3726 | } |
| 3727 | static int is_word_boundary_from_left(ImGuiInputTextState* obj, int idx) |
| 3728 | { |
| 3729 | if ((obj->Flags & ImGuiInputTextFlags_Password) || idx <= 0) |
no test coverage detected