void () { createEditor("line1\nline2\nline3\n"); EditorTestUtil.addFoldRegion(getEditor(), 5, 6, "...", true); int lineHeight = getEditor().getLineHeight(); Interval i1 = EditorUtil.yToLogicalLineRange(getEditor(), lineHeight / 2); assertEquals(0, i1.intervalStart()); assertEquals(1, i1.intervalEnd()); Interval i2 = EditorUtil.yToLogicalLineRange(getEditor(), lineHeight * 3 / 2); assertEquals(2, i2.intervalStart()); assertEquals(2, i2.intervalEnd()); }