code: public void selectWord(int position)
  	{
  		if (text.length() == 0)
  			return;
  
  		selectingText = true;
  
  		selectionCursor.jumpTo(position);
  		selectionCursor.jumpToNextSpace(true);
  		if (Character.isWhitespace(text.charAt(selectionCursor.index)))
  			selectionCursor.shiftRight();
  
  		cursor.jumpTo(position);
  		cursor.jumpToNextSpace(false);
  	}
docs: Select word.
  
  @param position the position