int length = content.getCharCount();
void clearSelection(boolean sendEvent) {	int selectionStart = selection.x;	int selectionEnd = selection.y;	int length = content.getCharCount();		resetSelection();	// redraw old selection, if any	if (selectionEnd - selectionStart > 0) {		// called internally to remove selection after text is removed		// therefore make sure redraw range is valid.		int redrawStart = Math.min(selectionStart, length);		int redrawEnd = Math.min(selectionEnd, length);		if (redrawEnd - redrawStart > 0) {			internalRedrawRange(redrawStart, redrawEnd - redrawStart, true);		}		if (sendEvent) {			sendSelectionEvent();		}	}}