int scrollOffset = Math.max(0, verticalScrollOffset - scrollLines * getVerticalIncrement()); if (scrollOffset < verticalScrollOffset) { setVerticalScrollOffset(scrollOffset, true); }
void doPageUp(boolean select, int lines) {	int oldColumnX = columnX;	int oldHScrollOffset = horizontalScrollOffset;	int caretLine = getCaretLine();	if (caretLine > 0) {			int scrollLines = Math.max(1, Math.min(caretLine, lines));		caretLine -= scrollLines;		caretOffset = getOffsetAtPoint(columnX, caretLine);		if (select) {			doSelection(ST.COLUMN_PREVIOUS);		}		// scroll one page up or to the top		int scrollOffset = Math.max(0, verticalScrollOffset - scrollLines * getVerticalIncrement());		if (scrollOffset < verticalScrollOffset) {			setVerticalScrollOffset(scrollOffset, true);		}	}	// explicitly go to the calculated caret line. may be different 	// from content.getLineAtOffset(caretOffset) when in word wrap mode	showCaret(caretLine);	// restore the original horizontal caret position	int hScrollChange = oldHScrollOffset - horizontalScrollOffset;	columnX = oldColumnX + hScrollChange;}