| 401 | } |
| 402 | |
| 403 | void TextField::cursorToNextWord() { |
| 404 | if (password) { |
| 405 | cursor = text.size(); |
| 406 | return; |
| 407 | } |
| 408 | size_t pos = text.find(' ', std::min(cursor + 1, (int) text.size())); |
| 409 | if (pos == std::string::npos) |
| 410 | pos = text.size(); |
| 411 | cursor = pos; |
| 412 | } |
| 413 | |
| 414 | void TextField::cursorToLineStart() { |
| 415 | if (password) { |