super.redraw(redrawX, redrawY, getClientArea().width, lineHeight, true);
super.redraw( redrawX + leftMargin, redrawY + topMargin, getClientArea().width, lineHeight, true);
public void setStyleRange(StyleRange range) {	checkWidget();	boolean redrawFirstLine = false;	boolean redrawLastLine = false;		// this API can not be used if the client is providing the line styles	if (userLineStyle) {		return;	} 	// check the range, make sure it falls within the range of the 	// text 	if (range != null && range.start + range.length > content.getCharCount()) {		SWT.error(SWT.ERROR_INVALID_RANGE);	} 		if (range != null) {		// the first and last line needs to be redrawn completely if the 		// font style is changing from SWT.NORMAL to something else or 		// vice versa. fixes 1G7M5WE.		int rangeEnd = range.start + range.length;		int firstLine = content.getLineAtOffset(range.start);		int lastLine = content.getLineAtOffset(rangeEnd);		int firstLineOffset = content.getOffsetAtLine(firstLine);		if (isStyleChanging(range, range.start, Math.min(rangeEnd, firstLineOffset + content.getLine(firstLine).length()))) {			redrawFirstLine = true;		}						if (lastLine != firstLine) {			int lastLineOffset = content.getOffsetAtLine(lastLine);			if (isStyleChanging(range, lastLineOffset, rangeEnd)) {				redrawLastLine = true;			}						}	}	if (isBidi()) {		redrawFirstLine = true;		redrawLastLine = true;	}	defaultLineStyler.setStyleRange(range);	if (range != null) {		int firstLine = content.getLineAtOffset(range.start);		int lastLine = content.getLineAtOffset(range.start + range.length);			// reset all lines affected by the style change but let the redraw		// recalculate only those that are visible.		lineCache.reset(firstLine, lastLine - firstLine + 1, true);		internalRedrawRange(range.start, range.length, true);		if (redrawFirstLine) {			// redraw starting at the style change start offset since			// single line text changes, followed by style changes will			// flash otherwise			int firstLineOffset = content.getOffsetAtLine(firstLine);			String firstLineText = content.getLine(firstLine);			int redrawX = getXAtOffset(firstLineText, firstLine, range.start - firstLineOffset);			int redrawY = firstLine * lineHeight - verticalScrollOffset;			super.redraw(redrawX, redrawY, getClientArea().width, lineHeight, true);		}		if (redrawLastLine) {			// redraw the whole line if the font style changed on the last line				int redrawY = lastLine * lineHeight - verticalScrollOffset;			super.redraw(0, redrawY, getClientArea().width, lineHeight, true);		}	}	else {		// reset all lines but let the redraw recalculate only those that 		// are visible.		lineCache.reset(0, content.getLineCount(), false);		redraw();	}	// make sure that the caret is positioned correctly.	// caret location may change if font style changes.	// fixes 1G8FODP	setCaretLocation();}