void () { initText("line1\nline2\nline3\nline4\nline5<caret>\n"); addBlockInlay(getEditor().getDocument().getText().indexOf("line5"), true, 0, getEditor().getLineHeight() * 5); setEditorVisibleSize(100, 3); getEditor().getScrollingModel().scrollVertically(getEditor().visualLineToY(getEditor().getCaretModel().getVisualPosition().line) - getEditor().getLineHeight()); executeAction(IdeActions.ACTION_EDITOR_MOVE_CARET_PAGE_UP); checkResultByText("line1\nline2\nline3\nline4<caret>\nline5\n"); }