newTopIndex = content.getLineAtOffset(topOffset);
int newTopIndex = content.getLineAtOffset(topOffset);
void wordWrapResize(int oldClientAreaWidth) {	WrappedContent wrappedContent = (WrappedContent) content;	int newTopIndex;	// all lines are wrapped and no rewrap required if widget has already 	// been visible, client area is now wider and visual (wrapped) line 	// count equals logical line count.	if (oldClientAreaWidth != 0 && clientAreaWidth > oldClientAreaWidth &&		wrappedContent.getLineCount() == logicalContent.getLineCount()) {		return;	}	wrappedContent.wrapLines();    	// adjust the top index so that top line remains the same	newTopIndex = content.getLineAtOffset(topOffset);	// topOffset is the beginning of the top line. therefore it 	// needs to be adjusted because in a wrapped line this is also 	// the end of the preceeding line.  	if (newTopIndex < content.getLineCount() - 1 &&		topOffset == content.getOffsetAtLine(newTopIndex + 1)) {		newTopIndex++;	}	if (newTopIndex != topIndex) {		ScrollBar verticalBar = getVerticalBar();		// adjust index and pixel offset manually instead of calling		// setVerticalScrollOffset because the widget does not actually need		// to be scrolled. causes flash otherwise.		verticalScrollOffset += (newTopIndex - topIndex) * getVerticalIncrement();		// verticalScrollOffset may become negative if first line was 		// partially visible and second line was top line. prevent this from 		// happening to fix 8503.		if (verticalScrollOffset < 0) {			verticalScrollOffset = 0;		}		topIndex = newTopIndex;		topOffset = content.getOffsetAtLine(topIndex);		if (verticalBar != null) {			verticalBar.setSelection(verticalScrollOffset);		}	}	// caret may be on a different line after a rewrap.	// call setCaretLocation after fixing vertical scroll offset.	setCaretLocation();    	// word wrap may have changed on one of the visible lines	super.redraw();}