int line = content.getLineAtOffset(caretOffset); int lineOffset = content.getOffsetAtLine(line); int lineLength = content.getLine(line).length();
int caretLine = getCaretLine(); int lineOffset = content.getOffsetAtLine(caretLine); int lineLength = content.getLine(caretLine).length();
void doLineEnd() {	int line = content.getLineAtOffset(caretOffset);	int lineOffset = content.getOffsetAtLine(line);		int lineLength = content.getLine(line).length();	int lineEndOffset = lineOffset + lineLength;		if (wordWrap && line != caretLine) {		// caret is at the start of a visual line		lineEndOffset = content.getOffsetAtLine(caretLine) + content.getLine(caretLine).length();	}		if (caretOffset < lineEndOffset) {		caretOffset = lineEndOffset;		showCaret();	}}