pos.x = columnX; pos.x += horizontalScrollOffset - rightMargin; pos.y -= getLinePixel(caretLine) + topMargin;
pos.x = columnX + horizontalScrollOffset; pos.y -= getLinePixel(caretLine);
void doLineUp(boolean select) {	int caretLine = getCaretLine();	boolean paragraphUp = true;	if (wordWrap) {		String line = content.getLine(caretLine);		int lineOffset = content.getOffsetAtLine(caretLine);		TextLayout layout = renderer.getTextLayout(line, lineOffset);		if (layout.getLineCount() > 0) {			Point pos = getCaret().getLocation();			pos.x = columnX;			pos.x += horizontalScrollOffset - rightMargin;			pos.y -= getLinePixel(caretLine) + topMargin;			int offset = layout.getOffset(pos, null);			int lineInParagraph = layout.getLineIndex(offset);			if (lineInParagraph > 0) {				paragraphUp = false;				pos.y -= layout.getLineBounds(lineInParagraph).height;				caretOffset = lineOffset + layout.getOffset(pos, null);			}		}		renderer.disposeTextLayout(layout);	}	if (select && caretLine == 0) {		caretOffset = 0;	}	if (paragraphUp && caretLine > 0) {		caretLine--;		String line = content.getLine(caretLine);		int lineOffset = content.getOffsetAtLine(caretLine);		TextLayout layout = renderer.getTextLayout(line, lineOffset);		int x = columnX + horizontalScrollOffset - leftMargin;		int y = layout.getBounds().height - 1;		caretOffset = lineOffset + layout.getOffset(x, y, null);		renderer.disposeTextLayout(layout);	}	int oldColumnX = columnX;	int oldHScrollOffset = horizontalScrollOffset;	if (select) setMouseWordSelectionAnchor();	showCaret();	if (select) doSelection(ST.COLUMN_PREVIOUS);	int hScrollChange = oldHScrollOffset - horizontalScrollOffset;	columnX = oldColumnX + hScrollChange;}