showCaret(caretLine);
int lineOffset = content.getOffsetAtLine(caretLine); String line = content.getLine(caretLine); int offsetInLine = caretOffset - lineOffset; Point newCaretPos = getPointAtOffset(line, caretLine, offsetInLine); boolean scrolled = showLocation(newCaretPos);   if (!scrolled) { Point point = new Point(newCaretPos.x, newCaretPos.y); TextLayout layout = renderer.getTextLayout(line, lineOffset); point.y += layout.getLineBounds(layout.getLineIndex(offsetInLine)).height; renderer.disposeTextLayout(layout); scrolled = showLocation(point); }  if (!scrolled) {  setCaretLocation(newCaretPos, caretLine, getCaretDirection()); }
void showCaret() {	int caretLine = content.getLineAtOffset(caretOffset);	showCaret(caretLine);}