if(s != null && caret != s.end)
if(s != null)
	public void goToNextCharacter(boolean select)	{		if(!select && selection.size() != 0)		{			Selection s = getSelectionAtOffset(caret);			if(s != null && caret != s.end)			{				if(!multi)					removeFromSelection(s);				moveCaretPosition(s.end);				return;			}		}		if(caret == buffer.getLength())			getToolkit().beep();		int newCaret;		if(caret == getLineEndOffset(caretLine) - 1)		{			int line = buffer.getNextVisibleLine(caretLine);			if(line == -1)			{				getToolkit().beep();				return;			}			newCaret = getLineStartOffset(line);		}		else			newCaret = caret + 1;		if(select)			extendSelection(caret,newCaret);		else if(!multi)			selectNone();		moveCaretPosition(newCaret);	}