if (lineBreakStartX == 0) { lineBreakStartX = XINSET; } lineBreakStartX = lineBreakStartX - horizontalScrollOffset;
void redrawBidiLines(int firstLine, int offsetInFirstLine, int lastLine, int endOffset, boolean clearBackground) {	int lineCount = lastLine - firstLine + 1;	int redrawY = firstLine * lineHeight - verticalScrollOffset;	int firstLineOffset = content.getOffsetAtLine(firstLine);	String line = content.getLine(firstLine);	GC gc = new GC(this);	StyledTextBidi bidi = getStyledTextBidi(line, firstLineOffset, gc);			bidi.redrawRange(this, offsetInFirstLine, Math.min(line.length(), endOffset) - offsetInFirstLine, -horizontalScrollOffset, redrawY, lineHeight);	// redraw line break marker (either space or full client area width)	// if redraw range extends over more than one line and background should be redrawn	if (lastLine > firstLine && clearBackground) {		int lineBreakStartX = bidi.getTextWidth() - horizontalScrollOffset;		int lineBreakWidth;				if ((getStyle() & SWT.FULL_SELECTION) != 0) {			lineBreakWidth = getClientArea().width - lineBreakStartX;		}		else {			lineBreakWidth = lineEndSpaceWidth;		}		draw(lineBreakStartX, redrawY, lineBreakWidth, lineHeight, clearBackground);	}	// redraw last line if more than one line needs redrawing 	if (lineCount > 1) {		int lastLineOffset = content.getOffsetAtLine(lastLine);		int offsetInLastLine = endOffset - lastLineOffset;			// no redraw necessary if redraw offset is 0		if (offsetInLastLine > 0) {							line = content.getLine(lastLine);			redrawY = lastLine * lineHeight - verticalScrollOffset;					bidi = getStyledTextBidi(line, lastLineOffset, gc);			bidi.redrawRange(this, 0, offsetInLastLine, -horizontalScrollOffset, redrawY, lineHeight);		}	}	gc.dispose();}