| 378 | } |
| 379 | |
| 380 | String TextEditor::selection() const { |
| 381 | int start = selectionStart(); |
| 382 | int end = selectionEnd(); |
| 383 | return text_.text().substring(start, end - start); |
| 384 | } |
| 385 | |
| 386 | int TextEditor::beginningOfWord() const { |
| 387 | int index = caret_position_ - 1; |