void () { initText("<caret>" + StringUtil.repeat("abc", 100)); int scrollJumpBefore = getEditor().getSettings().getHorizontalScrollJump(); getEditor().getSettings().setHorizontalScrollJump(10); int spaceWidth = EditorUtil.getSpaceWidth(Font.PLAIN, getEditor()); EditorTestUtil.setEditorVisibleSize(getEditor(), 15, 2); for (int i = 0; i < 15 - getEditor().getSettings().getHorizontalScrollOffset(); ++i) { right(); } assertEquals(0, getEditor().getScrollingModel().getHorizontalScrollOffset()); right(); assertEquals(10 * spaceWidth, getEditor().getScrollingModel().getHorizontalScrollOffset()); getEditor().getSettings().setHorizontalScrollJump(scrollJumpBefore); }