Get the position (character offset) of the caret. With text selected, this will be the last character actually selected, no matter the direction of the selection. That is, if the user clicks and drags to select lines 7 up to 4, then the caret position will be somewhere on line four.
()
| 1676 | * 7 up to 4, then the caret position will be somewhere on line four. |
| 1677 | */ |
| 1678 | public int getCaretOffset() { |
| 1679 | return textarea.getCaretPosition(); |
| 1680 | } |
| 1681 | |
| 1682 | |
| 1683 | /** |
no test coverage detected