int magic = getMagicCaretPosition(); if(magic == -1) { magic = offsetToX(line,caret - getLineStartOffset(line)); }
int magic = magicCaret;
	public void goToPrevPage(boolean select)	{		int caret = getCaretPosition();		int line = getCaretLine();		if(firstLine < visibleLines)			setFirstLine(0);		else			setFirstLine(firstLine - visibleLines);		int magic = getMagicCaretPosition();		if(magic == -1)		{			magic = offsetToX(line,caret - getLineStartOffset(line));		}		line = buffer.virtualToPhysical(Math.max(0,			buffer.physicalToVirtual(line) - visibleLines));		caret = getLineStartOffset(line) + xToOffset(line,magic + 1);		if(select)			select(getMarkPosition(),caret);		else			setCaretPosition(caret);		setMagicCaretPosition(magic);	}