y -= topMargin;
int getLineIndex(int y) {	if (isFixedLineHeight()) {		int lineIndex = (y + verticalScrollOffset) / lineHeight;		int lineCount = content.getLineCount();		if (lineIndex >= lineCount) {			lineIndex = lineCount - 1;		}		return lineIndex;	}//	if (true) {//	y += verticalScrollOffset;//	int lineIndex = 0, height = 0;	//	int lineCount = content.getLineCount();	//	while (lineCount > lineIndex) {//		height += lineCache.getLineHeight(lineIndex);//		if (height > y) break;//		lineIndex++;//	}//	return Math.min(lineCount - 1, lineIndex);//	}		if (y < 0) {		int line = topIndex;		if (topIndex > 0) {			line--;			y += lineCache.getLineHeight(line) - partialHeight;			while (y < 0 && line > 0) {				line--;				y += lineCache.getLineHeight(line);			}		}		return line;	}	if (partialHeight > y) return topIndex - 1;	y -= partialHeight;	int line = topIndex;	int lineCount = content.getLineCount();	while (line < lineCount - 1) {		int lineHeight = lineCache.getLineHeight(line);		if (lineHeight > y) break;		y -= lineHeight;		line++;	}	return line;}