int firstIndent = textArea.getLineStartOffset(line) + MiscUtilities.getLeadingWhiteSpace(textArea
int firstIndent = MiscUtilities.getLeadingWhiteSpace(textArea
	public void actionPerformed(ActionEvent evt)	{		View view = getView(evt);		JEditTextArea textArea = view.getTextArea();		InputHandler inputHandler = view.getInputHandler();		int caret = textArea.getCaretPosition();		int line = textArea.getCaretLine();		int firstIndent = textArea.getLineStartOffset(line)			+ MiscUtilities.getLeadingWhiteSpace(textArea			.getLineText(line));		int firstOfLine = textArea.getLineStartOffset(			textArea.getCaretLine());		int firstLine = textArea.getFirstLine();		int electricScroll = textArea.getElectricScroll();		int firstVisibleLine = (firstLine <= electricScroll) ? 0 :			firstLine + electricScroll;		if(firstVisibleLine >= textArea.getLineCount())			firstVisibleLine = textArea.getLineCount() - 1;		int firstVisible = textArea.getLineStartOffset(firstVisibleLine);		int[] positions = { firstIndent, firstOfLine, firstVisible };		int count;		if(!jEdit.getBooleanProperty("view.homeEnd"))			count = 1;		else if(inputHandler.getLastAction() == this)		{			count = Math.min(positions.length,inputHandler				.getLastActionCount()) - 1;		}		else			count = 0;		caret = positions[count];		if(select)			textArea.select(textArea.getMarkPosition(),caret);		else			textArea.setCaretPosition(caret);	}