String lineText = content.getLine(caretLine); int offsetInLine = caretOffset - content.getOffsetAtLine(caretLine); int caretX = getXAtOffset(lineText, caretLine, offsetInLine);
int caretX = getCaretX();
void doLineDown() {	if (isSingleLine()) {		return;	}	// allow line down action only if receiver is not in single line mode.	// fixes 4820.	if (caretLine < content.getLineCount() - 1) {		String lineText = content.getLine(caretLine);		int offsetInLine = caretOffset - content.getOffsetAtLine(caretLine);		int caretX = getXAtOffset(lineText, caretLine, offsetInLine);				caretLine++;		if (isBidi()) {			caretOffset = getBidiOffsetAtMouseLocation(caretX, caretLine);		}		else {			caretOffset = getOffsetAtMouseLocation(caretX, caretLine);		}			}}