void () { createEditor("line1\nline2\nlong long line\n"); assertTrue("Failed to activate soft wrapping", EditorTestUtil.configureSoftWraps(getEditor(), 10)); int lineHeight = getEditor().getLineHeight(); @NotNull Pair<@NotNull Interval, @Nullable Interval> p1 = EditorUtil.logicalLineToYRange(getEditor(), 1); assertEquals(lineHeight, p1.first.intervalStart()); assertEquals(lineHeight * 2, p1.first.intervalEnd()); assertEquals(lineHeight, p1.second.intervalStart()); assertEquals(lineHeight * 2, p1.second.intervalEnd()); @NotNull Pair<@NotNull Interval, @Nullable Interval> p2 = EditorUtil.logicalLineToYRange(getEditor(), 2); assertEquals(lineHeight * 2, p2.first.intervalStart()); assertEquals(lineHeight * 4, p2.first.intervalEnd()); assertEquals(lineHeight * 2, p2.second.intervalStart()); assertEquals(lineHeight * 4, p2.second.intervalEnd()); }