void () { createSmallEditor("12345\n12345<caret>\n"); Rectangle oldVisibleArea = getEditor().getScrollingModel().getVisibleAreaOnScrollingFinished(); EditorUtil.scrollToTheEnd(getEditor(), true); // caret should be at the end, but only vertical scrolling should happen assertCaretAt(2, 0, false); Rectangle newVisibleArea = getEditor().getScrollingModel().getVisibleAreaOnScrollingFinished(); assertEquals(oldVisibleArea.x, newVisibleArea.x); assertTrue(oldVisibleArea.y < newVisibleArea.y); }