void () { int visibleTargetPageIndex = documentOfPagesModel.tryGetIndexOfNeededPageInList(targetVisiblePosition.pageNumber); if (visibleTargetPageIndex == -1) { return; } int symbolOffsetToBeginningOfTargetVisiblePage = getSymbolOffsetToStartOfPage(visibleTargetPageIndex); int topOfTargetVisiblePage = offsetToY(symbolOffsetToBeginningOfTargetVisiblePage); int targetTopOfVisibleArea = topOfTargetVisiblePage + targetVisiblePosition.verticalScrollOffset; if (editor.getScrollingModel().getVisibleAreaOnScrollingFinished().y != targetTopOfVisibleArea) { editor.getScrollingModel().disableAnimation(); editor.getScrollingModel().scrollVertically(targetTopOfVisibleArea); editor.getScrollingModel().enableAnimation(); } if (editor.getScrollingModel().getVisibleAreaOnScrollingFinished().y == targetTopOfVisibleArea) { isLocalScrollBarStabilized = true; } }