MCPcopy Create free account
hub / github.com/benfry/processing4 / getCaretOffset

Method getCaretOffset

app/src/processing/app/ui/Editor.java:1416–1418  ·  view source on GitHub ↗

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.

()

Source from the content-addressed store, hash-verified

1414 * 7 up to 4, then the caret position will be somewhere on line four.
1415 */
1416 public int getCaretOffset() {
1417 return textarea.getCaretPosition();
1418 }
1419
1420
1421 /**

Callers 3

insertTextMethod · 0.95
clearSelectionMethod · 0.80
renameMethod · 0.80

Calls 1

getCaretPositionMethod · 0.80

Tested by

no test coverage detected